# HG changeset patch # User jittat # Date 2008-01-17 14:10:17 # Node ID 5f97b81f01be3b5d522911d5330445009f307180 # Parent 4a517b89268ac2150ff0eafd309cdb070d2aa79b fix all_tests.cfg bug git-svn-id: http://theory.cpe.ku.ac.th/grader/cli/trunk/scripts@16 6386c4cd-e34a-4fa8-8920-d93eb39b512e diff --git a/all_tests.cfg.erb b/all_tests.cfg.erb --- a/all_tests.cfg.erb +++ b/all_tests.cfg.erb @@ -5,8 +5,8 @@ mem_limit_each <%= options[:mem_limit] %> score_each 10 -<% 1.upto(num_testcase) do |i| %> - run <%= i %> +<% 1.upto(num_testcases) do |i| %> + run <%= i %> do tests <%= i %> end <% end %> diff --git a/import_problem b/import_problem --- a/import_problem +++ b/import_problem @@ -70,7 +70,7 @@ # generating all_tests.cfg puts "generating testcase config file" -template = File.open("all_tests.cfg.erb").readlines +template = File.open(File.dirname(__FILE__) + "/all_tests.cfg.erb").read all_test_cfg = ERB.new(template) cfg_file = File.open("#{problem}/test_cases/all_tests.cfg","w")