diff options
Diffstat (limited to 'sample/test.rb')
-rw-r--r-- | sample/test.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sample/test.rb b/sample/test.rb index da44b180f3..18c914d5b3 100644 --- a/sample/test.rb +++ b/sample/test.rb @@ -14,10 +14,10 @@ end def test_ok(cond,n=1) $testnum+=1 $ntest+=1 + where = (st = caller(n)) ? st[0] : "caller error! (n=#{n}, trace=#{caller(0).join(', ')}" if cond - printf "ok %d\n", $testnum + printf "ok %d (%s)\n", $testnum, where else - where = (st = caller(n)) ? st[0] : "caller error! (n=#{n}, trace=#{caller(0).join(', ')}" printf "not ok %s %d -- %s\n", $what, $testnum, where $failed+=1 end |