summaryrefslogtreecommitdiff
path: root/test/pathname
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-08-07 04:59:27 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-08-07 04:59:27 +0000
commita438fce7e349c38fc9d0136da79806c2adf357ba (patch)
treea833b72617c7f453f406209681122e6756154f44 /test/pathname
parentfd0485acf7936e865903d643715433a7b861afbb (diff)
* ext/pathname/pathname.c (path_sub_ext): don't clobber shared string.
[ruby-core:31640] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28896 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/pathname')
-rw-r--r--test/pathname/test_pathname.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/test/pathname/test_pathname.rb b/test/pathname/test_pathname.rb
index 94bcffa..eb42aab 100644
--- a/test/pathname/test_pathname.rb
+++ b/test/pathname/test_pathname.rb
@@ -19,7 +19,10 @@ class TestPathname < Test::Unit::TestCase
def self.defassert(name, result, *args)
define_assertion(name) {
- assert_equal(result, self.send(name, *args), "#{name}(#{args.map {|a| a.inspect }.join(', ')})")
+ mesg = "#{name}(#{args.map {|a| a.inspect }.join(', ')})"
+ assert_nothing_raised(mesg) {
+ assert_equal(result, self.send(name, *args), mesg)
+ }
}
end
@@ -506,6 +509,7 @@ class TestPathname < Test::Unit::TestCase
defassert(:pathsubext, 'lex.yy.o', 'lex.yy.c', '.o')
defassert(:pathsubext, 'fooaa.o', 'fooaa', '.o')
defassert(:pathsubext, 'd.e/aa.o', 'd.e/aa', '.o')
+ defassert(:pathsubext, 'long_enough.bug-3664', 'long_enough.not_to_be_embeded[ruby-core:31640]', '.bug-3664')
def test_sub_matchdata
result = Pathname("abc.gif").sub(/\..*/) {