diff --git a/std-script/judge b/std-script/judge --- a/std-script/judge +++ b/std-script/judge @@ -53,7 +53,7 @@ end language = ARGV[0] -if language != "c" && language != "c++" && language != "pas" && language != "java" && language != "ruby" && language != "python" && language != "php" +if language != "c" && language != "c++" && language != "pas" && language != "java" && language != "ruby" && language != "python" && language != "php" && language != "haskell" log "You specified a language that is not supported: #{language}." exit(127) end @@ -140,6 +140,12 @@ if language == "python" then Dir["#{test_result_dir}/*.pyc"].each { |file| FileUtils.cp(file,sandbox_dir)} end } + #additionally copy any extra .txt file + data_files = Dir[problem_home + '/*.txt'] + data_files.each do |file| + FileUtils.cp(file,sandbox_dir) + end + begin execute("#{problem_home}/script/run #{language} #{test_num} ", "Error occured during execution of the run script") rescue