ruby-changes:62939
From: Nobuyoshi <ko1@a...>
Date: Mon, 14 Sep 2020 18:28:38 +0900 (JST)
Subject: [ruby-changes:62939] 04de778ef1 (master): [ruby/tmpdir] Test "not a directory" cases
https://git.ruby-lang.org/ruby.git/commit/?id=04de778ef1 From 04de778ef157c472dfa31239e8a6cfabceae4cb0 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada <nobu@r...> Date: Mon, 13 Jul 2020 21:26:06 +0900 Subject: [ruby/tmpdir] Test "not a directory" cases https://github.com/ruby/tmpdir/commit/f335f2c23e diff --git a/test/test_tmpdir.rb b/test/test_tmpdir.rb index 039b5be..45342c4 100644 --- a/test/test_tmpdir.rb +++ b/test/test_tmpdir.rb @@ -19,6 +19,12 @@ class TestTmpdir < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/test_tmpdir.rb#L19 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) -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/