summaryrefslogtreecommitdiff
path: root/test/ruby/test_file_exhaustive.rb
diff options
context:
space:
mode:
authorxtkoba (Tee KOBAYASHI) <xtkoba+ruby@gmail.com>2021-02-14 19:43:45 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2021-02-14 19:44:41 +0900
commita681c484a3c5b9235c84bc5c253b4406e498e8cf (patch)
tree8a9b58c3739da367fff51db7752f18ded8ff1502 /test/ruby/test_file_exhaustive.rb
parent416956afa6bd64894b0412100985a1a0de0ac480 (diff)
Fixed codepage for utime [Bug #17626]
Should use the given codepage argument. Co-Authored-By: Nobuyoshi Nakada <nobu@ruby-lang.org>
Diffstat (limited to 'test/ruby/test_file_exhaustive.rb')
-rw-r--r--test/ruby/test_file_exhaustive.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/ruby/test_file_exhaustive.rb b/test/ruby/test_file_exhaustive.rb
index b966cc690c..0cb63c8f05 100644
--- a/test/ruby/test_file_exhaustive.rb
+++ b/test/ruby/test_file_exhaustive.rb
@@ -679,6 +679,13 @@ class TestFileExhaustive < Test::Unit::TestCase
File.utime(t + 1, t + 2, zerofile)
assert_equal(t + 1, File.atime(zerofile))
assert_equal(t + 2, File.mtime(zerofile))
+ Dir.mktmpdir do |dir|
+ Dir.chdir do
+ path = "foo\u{30b3 30d4 30fc}"
+ File.write(path, "") rescue next
+ assert_equal(1, File.utime(nil, nil, path))
+ end
+ end
end
def test_utime_symlinkfile