Authentication realm: SVN Index: Test.rb =================================================================== --- Test.rb (revision 96) +++ Test.rb (working copy) @@ -51,13 +51,12 @@ for case_num in 0...@cases.length do options = @cases[case_num].get_options() for option in options - #p ["option", option] if option.index("-points") == 0 then option =~ /=/ points = ", " + $' + " points" npoints =$'.to_f - maxpoints += npoints end + maxpoints += npoints end end return maxpoints @@ -126,7 +125,7 @@ next end - outfname = $run_config.outfile_path(@name + ".out." + case_num.to_s) + outfname = $run_config.outfile_path(@name + ".out." + (case_num+1).to_s) cd_cmd = "cd " + student_dir + ";" cmd = "#{cd_cmd} PATH=.:$PATH #{expanded_cmd} > #{outfname} 2>&1" @@ -205,7 +204,7 @@ if totalpoints then totalpoints += adjScoreManual totalpoints = 0.0 if totalpoints < 0 - line = "| TOTAL POINTS for #{@name}: #{sprintf("%.2f", totalpoints)} |" + line = "| TOTAL POINTS for #{@name}: #{sprintf("%.1f", totalpoints)} |" puts("\n", barline = "-"* line.length) puts(line) puts(barline) Index: TextTest.rb =================================================================== --- TextTest.rb (revision 96) +++ TextTest.rb (working copy) @@ -118,7 +118,7 @@ else cf = File.open(file, "r"); while line = cf.gets do - result = line.scan(/[Ss]core[ \t]*:?[ \t]*?([-+]?\d\d*\.?\d*)/); + result = line.scan(/[Ss]core[ \t]*:?[ \t]*?(-?\d\d*\.?\d*)/); if( result != nil && result.length > 0 && result[0].length > 0 && is_numeric(result[0][0]) ) then #we found a manual score entry! @manualscore += result[0][0].chomp().to_f; @@ -148,7 +148,6 @@ list_file(filewithpath ) else puts "The file #{get_files()} was not found.\n" + "If you submitted it, see the instructor.\n" - @manualscore = 0.0 end if npoints != 0.0 then Index: Config.rb =================================================================== --- Config.rb (revision 96) +++ Config.rb (working copy) @@ -48,6 +48,7 @@ end @problem_names = argtable[?p] + @problem_names.map! { |name| name.split(".")[0] } @test_names = argtable[?t] || [] @students = argtable[?s] #puts argtable.inspect @@ -93,7 +94,7 @@ current_problem.set_silence(TRUE) current = current_problem @problem_list << current_problem.get_name - + when "textfile" then # case added by rlb current_problem = TextFile.new(args) current = current_problem Index: Tester.rb =================================================================== --- Tester.rb (revision 96) +++ Tester.rb (working copy) @@ -24,15 +24,11 @@ if @DEBUG ==1 then puts "DEBUG: running a problem" end if @DEBUG ==1 then puts $problems.inspect + probnm.inspect + student.inspect + $listing.inspect end - # - # Try both the specified name and the name minus extension, like - # "ftypes" and "ftypes.hs". - problem = $problems[probnm] || $problems[probnm.split(".")[0]] - - if not problem - raise "Error: problem '" + probnm + "' not found" + if not $problems[probnm] then + print "Error: problem '" + probnm + "' not found\n" + exit end - problem.test(student, $listing) + $problems[probnm].test(student, $listing) new_page end end_student