aboutsummaryrefslogtreecommitdiffstats
path: root/test/ruby/test_argf.rb
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/ruby/test_argf.rb
parentf0fbf6c976b3bb5494c9740b1c6235306946f696 (diff)
downloadruby-f9e9eee677e8196da7288f4ab7754ebe345d7ed9.tar.gz
* 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/ruby/test_argf.rb')
-rw-r--r--test/ruby/test_argf.rb15
1 files changed, 4 insertions, 11 deletions
diff --git a/test/ruby/test_argf.rb b/test/ruby/test_argf.rb
index 0e709a204d..e249c757ea 100644
--- a/test/ruby/test_argf.rb
+++ b/test/ruby/test_argf.rb
@@ -201,21 +201,14 @@ class TestArgf < Test::Unit::TestCase
t = make_tempfile
assert_in_out_err(["-", t.path], <<-INPUT) do |r, e|
- ARGF.inplace_mode = '/\\\\'
+ ARGF.inplace_mode = '/\\\\:'
while line = ARGF.gets
puts line.chomp + '.new'
end
INPUT
- if no_safe_rename
- assert_equal([], e)
- assert_equal([], r)
- assert_equal("foo.new\nbar.new\nbaz.new\n", File.read(t.path))
- File.unlink(t.path + ".~~~") rescue nil
- else
- assert_match(/Can't rename .* to .*: .*. skipping file/, e.first) #'
- assert_equal([], r)
- assert_equal("foo\nbar\nbaz\n", File.read(t.path))
- end
+ assert_match(/Can't rename .* to .*: .*. skipping file/, e.first) #'
+ assert_equal([], r)
+ assert_equal("foo\nbar\nbaz\n", File.read(t.path))
end
end