summaryrefslogtreecommitdiff
path: root/test/-ext-
diff options
context:
space:
mode:
authorusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-08-03 07:10:56 +0000
committerusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-08-03 07:10:56 +0000
commitf9e9eee677e8196da7288f4ab7754ebe345d7ed9 (patch)
tree9afc0d17c7d9c39a4aa15315199939b632544147 /test/-ext-
parentf0fbf6c976b3bb5494c9740b1c6235306946f696 (diff)
* util.c, include/ruby/util.h (ruby_add_suffix): remove the function.
[Bug #5153] [ruby-core:38736] * io.c (argf_next_argv): remove the call of above function. * ext/-test-/add_suffix, test/-ext-/test_add_suffix.rb: remove the test extension module because this is only for testsing ruby_add_suffix(). * LEGAL: remove the mention about a part of util.c, because now we removed the part. * io.c (argf_next_argv): now the new filename is not guranteed to use, so should check the return value of rename(2). * test/ruby/test_argf.rb (TestArgf#test_inplace_rename_impossible): now we expect same result with other platforms on no_safe_rename platforms (=Windows). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32826 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/-ext-')
-rw-r--r--test/-ext-/test_add_suffix.rb47
1 files changed, 0 insertions, 47 deletions
diff --git a/test/-ext-/test_add_suffix.rb b/test/-ext-/test_add_suffix.rb
deleted file mode 100644
index 0520baef8c6..00000000000
--- a/test/-ext-/test_add_suffix.rb
+++ /dev/null
@@ -1,47 +0,0 @@
-require 'test/unit'
-require_relative '../ruby/envutil'
-require "-test-/add_suffix/bug"
-
-class Test_AddSuffix < Test::Unit::TestCase
- Dir = "/dev/null/".freeze
- Style_1 = (Dir+"foo").freeze
-
- def test_style_0
- assert_equal("a.x.y", Bug.add_suffix("a.x", ".y"))
- end
-
- def test_style_1
- assert_equal(Style_1+".y", Bug.add_suffix(Style_1+".c", ".y"))
- suffix = ".bak".freeze
- assert_equal(Style_1+suffix, Bug.add_suffix(Style_1.dup, suffix))
- assert_equal(Style_1+suffix, Bug.add_suffix(Style_1+".bar", suffix))
- assert_equal(Style_1+".$$$", Bug.add_suffix(Style_1+suffix, suffix))
- assert_equal(Style_1+suffix, Bug.add_suffix(Style_1+".$$$", suffix))
- assert_equal(Style_1+".~~~", Bug.add_suffix(Style_1+".$$$", ".$$$"))
- assert_equal(Dir+"makefile"+suffix, Bug.add_suffix(Dir+"makefile", suffix))
- end
-
- def test_style_2
- suffix = "~"
- assert_equal(Style_1+"~", Bug.add_suffix(Style_1.dup, suffix))
- assert_equal(Style_1+".c~", Bug.add_suffix(Style_1+".c", suffix))
- assert_equal(Style_1+".c~~", Bug.add_suffix(Style_1+".c~", suffix))
- assert_equal(Style_1+"~.c~~", Bug.add_suffix(Style_1+".c~~", suffix))
- assert_equal(Style_1+"~~.c~~", Bug.add_suffix(Style_1+"~.c~~", suffix))
- assert_equal(Style_1+"~~~~~.cc~", Bug.add_suffix(Style_1+"~~~~~.ccc", suffix))
- assert_equal(Style_1+"~~~~~.$$$", Bug.add_suffix(Style_1+"~~~~~.c~~", suffix))
- assert_equal(Dir+"foo~.pas", Bug.add_suffix(Dir+"foo.pas", suffix))
- assert_equal(Dir+"makefile.~", Bug.add_suffix(Dir+"makefile", suffix))
- assert_equal(Dir+"longname.fi~", Bug.add_suffix(Dir+"longname.fil", suffix))
- assert_equal(Dir+"longnam~.fi~", Bug.add_suffix(Dir+"longname.fi~", suffix))
- assert_equal(Dir+"longnam~.$$$", Bug.add_suffix(Dir+"longnam~.fi~", suffix))
- end
-
- def test_style_3
- base = "a"*1000
- suffix = "-"+"b"*1000
- assert_equal(base+".~~~", Bug.add_suffix(base, suffix))
- assert_equal(base+".~~~", Bug.add_suffix(base+".$$$", suffix))
- assert_equal(base+".$$$", Bug.add_suffix(base+".~~~", suffix))
- end
-end