summaryrefslogtreecommitdiff
path: root/sample
diff options
context:
space:
mode:
authorko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-07-06 09:23:53 +0000
committerko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-07-06 09:23:53 +0000
commit616f4d33856a539e89aadfbf75ebb17acc7781da (patch)
tree8f07c8ae87b82e94b9aa721dc7ea33b34cab8ba3 /sample
parent9aa9c07c077d918a2a70c7e60402d1e475c6686a (diff)
* bootstraptest/runner.rb: fix load path.
* common.mk: fix "test" rule to run with "btest". * rubytest.rb, sample/test.rb: fix to show tests progress. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12716 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'sample')
-rw-r--r--sample/test.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/sample/test.rb b/sample/test.rb
index bda0d1837c..387630d66e 100644
--- a/sample/test.rb
+++ b/sample/test.rb
@@ -6,7 +6,7 @@ $ntest=0
$failed = 0
def test_check(what)
- printf "%s\n", what
+ STDERR.print "\nsample/test.rb:#{what} "
$what = what
$testnum = 0
end
@@ -16,11 +16,15 @@ def test_ok(cond,n=1)
$ntest+=1
where = (st = caller(n)) ? st[0] : "caller error! (n=#{n}, trace=#{caller(0).join(', ')}"
if cond
+ STDERR.print "."
printf "ok %d (%s)\n", $testnum, where
else
+ STDERR.print "F"
printf "not ok %s %d -- %s\n", $what, $testnum, where
$failed+=1
end
+ STDOUT.flush
+ STDERR.flush
end
# make sure conditional operators work