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:
lib/import_helper.rb | 28 lines | 670 B | text/x-ruby | RubyLexer |
jittat
[grader] import script now support raw with testruns...
r63
jittat
MERGED change set (407:408) from web/judge in branch combined-with-judge (added import_problem_new)...
r72 def filter_filename_for_testrun(testrun, filename_list, raw_prefix='')
jittat
[grader] import script now support raw with testruns...
r63 l = []
jittat
MERGED change set (407:408) from web/judge in branch combined-with-judge (added import_problem_new)...
r72 regex = Regexp.new("^(#{Regexp.escape(raw_prefix)}#{testrun}[a-z]*|#{testrun}-.*)$")
jittat
[grader] import script now support raw with testruns...
r63 filename_list.each do |filename|
if regex.match(filename)
l << filename
end
end
l
end
jittat
MERGED change set (407:408) from web/judge in branch combined-with-judge (added import_problem_new)...
r72 def build_testrun_info(num_testruns, input_filename_list, raw_prefix='')
jittat
[grader] import script now support raw with testruns...
r63 info = []
num_testcases = 0
num_testruns.times do |i|
r = i+1
testrun_info = []
jittat
MERGED change set (407:408) from web/judge in branch combined-with-judge (added import_problem_new)...
r72 filenames = filter_filename_for_testrun(r,input_filename_list,raw_prefix)
jittat
[grader] import script now support raw with testruns...
r63 filenames.each do |fname|
num_testcases += 1
testrun_info << [num_testcases,fname]
end
info << testrun_info
end
info
end