Show More
Commit Description:
add option -A <opt> to box. This options allow more argument to be explicitly passed to the program...
Commit Description:
add option -A <opt> to box. This options allow more argument to be explicitly passed to the program We have to use this because if the argument we wish to pass to the program is option (in -? format), box will intepret it as its option and failed accordingly. be noted that, by the definition of getopt, these options will be put after original argument (check the code for more info)
References:
File last commit:
Show/Diff file:
Action:
test/import_helper_test.rb | 40 lines | 1.2 KiB | text/x-ruby | RubyLexer |
jittat
[grader] import script now support raw with testruns...
r63 require 'test/unit'
require 'rubygems'
require 'mocha'
require File.join(File.dirname(__FILE__),'../lib/import_helper')
class ImportHelperTest < Test::Unit::TestCase
def setup
end
def teardown
end
def test_build_only_singleton_testruns
testrun_info = build_testrun_info(3,['1','2','3'])
assert_equal [[[1,'1']],[[2,'2']],[[3,'3']]], testrun_info, 'should build singleton testruns'
end
def test_build_only_singleton_testruns2
testrun_info = build_testrun_info(4,['1','2','3','4'])
assert_equal [[[1,'1']],[[2,'2']],[[3,'3']],[[4,'4']]], testrun_info, 'should build singleton testruns'
end
def test_build_testruns_when_testcases_defined_by_appending_alphabets
testrun_info = build_testrun_info(4,['1a','1b','2','3a','3b','4'])
assert_equal [[[1,'1a'],[2,'1b']],
[[3,'2']],
[[4,'3a'],[5,'3b']],
[[6,'4']]], testrun_info
end
def test_build_testruns_when_testcases_defined_by_appending_dashed_numbers
testrun_info = build_testrun_info(4,['1-1','1-2','2','3-1','3-2','4'])
assert_equal [[[1,'1-1'],[2,'1-2']],
[[3,'2']],
[[4,'3-1'],[5,'3-2']],
[[6,'4']]], testrun_info
end
end