lib/tryouts.rb in tryouts-2.4.0 vs lib/tryouts.rb in tryouts-2.4.1

- old
+ new

@@ -107,12 +107,18 @@ end # Reset the testcase IO buffer testcase_io.truncate(0) end + + failed_tests += batch.failed + if Tryouts.debug? + msg "Batch failed_tests: #{batch.failed} (#{batch.failed?}) #{failed_tests}" + end end + # Create a line of separation before the result summary msg $INPUT_RECORD_SEPARATOR # newline if tryouts_incr suffix = "tryouts passed" @@ -123,10 +129,13 @@ actual_test_size = tryouts_incr - skipped_tests if actual_test_size > 0 success_count = tryouts_incr - failed_tests - skipped_tests total_count = tryouts_incr - skipped_tests msg cformat(success_count, total_count, suffix) + if Tryouts.debug? + msg "tryouts_incr: %d; failed: %d; skipped: %d" % [tryouts_incr, failed_tests, skipped_tests] + end end end # In what circumstance is this ever true? # @@ -254,9 +263,10 @@ $stderr.puts(*msgs) if debug? end def eval(str, path, line) Kernel.eval str, @container.send(:binding), path, line + rescue SyntaxError, LoadError => e Tryouts.err Console.color(:red, e.message), Console.color(:red, e.backtrace.first) nil end