mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
parent
f7f849e30c
commit
04de778ef1
1 changed files with 6 additions and 0 deletions
|
@ -19,6 +19,12 @@ class TestTmpdir < Test::Unit::TestCase
|
|||
oldenv = envs.each_with_object({}) {|v, h| h[v] = ENV.delete(v)}
|
||||
begin
|
||||
envs.each do |e|
|
||||
tmpdirx = File.join(tmpdir, e)
|
||||
ENV[e] = tmpdirx
|
||||
assert_not_equal(tmpdirx, Dir.tmpdir)
|
||||
File.write(tmpdirx, "")
|
||||
assert_not_equal(tmpdirx, Dir.tmpdir)
|
||||
File.unlink(tmpdirx)
|
||||
ENV[e] = tmpdir
|
||||
assert_equal(tmpdir, Dir.tmpdir)
|
||||
File.chmod(0777, tmpdir)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue