diff options
author | shyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-08-15 19:08:43 +0000 |
---|---|---|
committer | shyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-08-15 19:08:43 +0000 |
commit | d464704f111d211c1f1ff9ef23ef1d755054be00 (patch) | |
tree | b58b17b645dc463322e5fca57fe282360db659c9 /ruby_1_8_5/test/testunit/test_failure.rb | |
parent | e4f06b3f2dec4b5d6334c5e9907e1cecbf649fc4 (diff) |
add tag v1_8_5_54
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/tags/v1_8_5_54@12952 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ruby_1_8_5/test/testunit/test_failure.rb')
-rw-r--r-- | ruby_1_8_5/test/testunit/test_failure.rb | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/ruby_1_8_5/test/testunit/test_failure.rb b/ruby_1_8_5/test/testunit/test_failure.rb new file mode 100644 index 0000000000..164f942476 --- /dev/null +++ b/ruby_1_8_5/test/testunit/test_failure.rb @@ -0,0 +1,33 @@ +# Author:: Nathaniel Talbott. +# Copyright:: Copyright (c) 2003 Nathaniel Talbott. All rights reserved. +# License:: Ruby license. + +require 'test/unit' +require 'test/unit/failure' + +module Test::Unit + class TestFailure < TestCase + def test_display + f = Failure.new("name", [%q{location:1 in 'l'}], "message1\nmessage2") + assert_equal("name: message1", f.short_display) + assert_equal(<<EOM.strip, f.long_display) +Failure: +name [location:1]: +message1 +message2 +EOM + + f = Failure.new("name", [%q{location1:2 in 'l1'}, 'location2:1', %q{location3:3 in 'l3'}], "message1\nmessage2") + assert_equal("name: message1", f.short_display) + assert_equal(<<EOM.strip, f.long_display) +Failure: +name + [location1:2 in 'l1' + location2:1 + location3:3 in 'l3']: +message1 +message2 +EOM + end + end +end |