Description:
[grader] fix an option bug for import_problem
git-svn-id: http://theory.cpe.ku.ac.th/grader/judge/trunk/scripts@110 6386c4cd-e34a-4fa8-8920-d93eb39b512e
Commit status:
[Not Reviewed]
References:
Diff options:
Comments:
0 Commit comments
0 Inline Comments
Unresolved TODOs:
There are no unresolved TODOs
r27:914f6c15de62 - - 1 file changed: 2 inserted, 2 deleted
@@ -18,13 +18,13 | |||
|
18 | 18 | def copy_testcase(importing_test_dir,dir,i) |
|
19 | 19 | system("cp #{importing_test_dir}/#{i}.in #{input_filename(dir,i)}") |
|
20 | 20 | system("cp #{importing_test_dir}/#{i}.sol #{answer_filename(dir,i)}") |
|
21 | 21 | end |
|
22 | 22 | |
|
23 | 23 | def process_options(options) |
|
24 |
- i = |
|
|
24 | + i = 4 | |
|
25 | 25 | while i<ARGV.length |
|
26 | 26 | if ARGV[i]=='-t' |
|
27 | 27 | options[:time_limit] = ARGV[i+1].to_i if ARGV.length>i+1 |
|
28 | 28 | i += 1 |
|
29 | 29 | end |
|
30 | 30 | if ARGV[i]=='-m' |
@@ -35,13 +35,13 | |||
|
35 | 35 | end |
|
36 | 36 | end |
|
37 | 37 | |
|
38 | 38 | SCRIPT_DIR = File.dirname(__FILE__) |
|
39 | 39 | |
|
40 | 40 | # print usage |
|
41 | - if ARGV.length < 4 | |
|
41 | + if (ARGV.length < 4) or (ARGV[3][0,1]=="-") | |
|
42 | 42 | puts <<USAGE |
|
43 | 43 | using: import_problem name dir num check [options] |
|
44 | 44 | where: name = problem_name [ |
|
45 | 45 | dir = importing testcase directory |
|
46 | 46 | num = number of testcases |
|
47 | 47 | check = check script, which can be |
You need to be logged in to leave comments.
Login now