summaryrefslogtreecommitdiffhomepage
path: root/test/assert.rb
diff options
context:
space:
mode:
authorAkira Yumiyama <[email protected]>2013-02-02 12:30:06 +0900
committerAkira Yumiyama <[email protected]>2013-02-09 16:24:39 +0900
commit7c67bfedfd4cf819f445eaae7f8d2dfc4600c65a (patch)
treea5dbda0ea7a608d7f34855a32961d37458d3ec62 /test/assert.rb
parentd3c77559754a196476d1c9a5bdd30a8559affe30 (diff)
downloadmruby-7c67bfedfd4cf819f445eaae7f8d2dfc4600c65a.tar.gz
mruby-7c67bfedfd4cf819f445eaae7f8d2dfc4600c65a.zip
add mrbtest verbose mode ('-v' option)
Diffstat (limited to 'test/assert.rb')
-rw-r--r--test/assert.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/test/assert.rb b/test/assert.rb
index 4fe95de9d..218a911d4 100644
--- a/test/assert.rb
+++ b/test/assert.rb
@@ -23,6 +23,7 @@ end
# which will be tested by this
# assertion
def assert(str = 'Assertion failed', iso = '')
+ print(str, (iso != '' ? " [#{iso}]" : ''), ' : ') if $mrbtest_verbose
begin
if(!yield)
$asserts.push(assertion_string('Fail: ', str, iso))
@@ -37,6 +38,7 @@ def assert(str = 'Assertion failed', iso = '')
$kill_test += 1
print('X')
end
+ print("\n") if $mrbtest_verbose
end
##