diff --git a/std-script/grade b/std-script/grade --- a/std-script/grade +++ b/std-script/grade @@ -18,12 +18,14 @@ end def char_comment(comment) - if comment =~ /[iI]ncorrect/ + if comment =~ /[Ii]ncorrect/ INCORRECT_MARK elsif comment =~ /[Cc]orrect/ CORRECT_MARK elsif comment =~ /[Tt]ime/ TIMEOUT_MARK + elsif res = /^[Cc]omment:(.*)$/.match(comment) + res[1] else RUN_ERROR_MARK # these are run time errors end @@ -59,7 +61,7 @@ if result_file_lines.length>=2 run_score = run_score + result_file_lines[1].to_i run_comment += result_file_lines[0] - run_comment_short += char_comment(result_file_lines[0]) + run_comment_short += char_comment(result_file_lines[0].chomp) else run_comment += "result file for test #{test_num} error\n" run_comment_short += RUN_ERROR_MARK