summaryrefslogtreecommitdiff
path: root/test/test_tmpdir.rb
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2020-07-13 21:39:32 +0900
committerHiroshi SHIBATA <hsbt@ruby-lang.org>2020-09-14 18:22:19 +0900
commitdf1c035d0381e41a78ebc55b0450bab39b542cf2 (patch)
treeeb0e13570944e14c73f5fedd7f39473b5c9ce842 /test/test_tmpdir.rb
parent04de778ef157c472dfa31239e8a6cfabceae4cb0 (diff)
[ruby/tmpdir] Test "not writable" case
https://github.com/ruby/tmpdir/commit/84684d80f9
Diffstat (limited to 'test/test_tmpdir.rb')
-rw-r--r--test/test_tmpdir.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/test/test_tmpdir.rb b/test/test_tmpdir.rb
index 45342c4..7cee2e1 100644
--- a/test/test_tmpdir.rb
+++ b/test/test_tmpdir.rb
@@ -27,6 +27,8 @@ class TestTmpdir < Test::Unit::TestCase
File.unlink(tmpdirx)
ENV[e] = tmpdir
assert_equal(tmpdir, Dir.tmpdir)
+ File.chmod(0555, tmpdir)
+ assert_not_equal(tmpdir, Dir.tmpdir)
File.chmod(0777, tmpdir)
assert_not_equal(tmpdir, Dir.tmpdir)
newdir = Dir.mktmpdir("d", tmpdir) do |dir|