diff options
author | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2022-03-31 12:51:04 +0900 |
---|---|---|
committer | git <svn-admin@ruby-lang.org> | 2022-10-28 09:36:28 +0000 |
commit | 4021c6565f9655bfd667152f76f22f7cc81c7e17 (patch) | |
tree | e4369f2c672e6c22b21dd4f784cb056ecc5789b5 /test/irb/test_init.rb | |
parent | 56c97a6621241db99f7c96740164bdd8f898d881 (diff) | |
download | ruby-4021c6565f9655bfd667152f76f22f7cc81c7e17.tar.gz |
[ruby/irb] Do not make non-existent XDG directory on start
(https://github.com/ruby/irb/pull/357)
https://github.com/ruby/irb/commit/298b134792
Diffstat (limited to 'test/irb/test_init.rb')
-rw-r--r-- | test/irb/test_init.rb | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/test/irb/test_init.rb b/test/irb/test_init.rb index 074aae4070..39c5cfa8a0 100644 --- a/test/irb/test_init.rb +++ b/test/irb/test_init.rb @@ -36,13 +36,16 @@ module TestIRB def test_rc_file tmpdir = @tmpdir Dir.chdir(tmpdir) do + ENV["XDG_CONFIG_HOME"] = "#{tmpdir}/xdg" IRB.conf[:RC_NAME_GENERATOR] = nil assert_equal(tmpdir+"/.irb#{IRB::IRBRC_EXT}", IRB.rc_file) assert_equal(tmpdir+"/.irb_history", IRB.rc_file("_history")) + assert_file.not_exist?(tmpdir+"/xdg") IRB.conf[:RC_NAME_GENERATOR] = nil FileUtils.touch(tmpdir+"/.irb#{IRB::IRBRC_EXT}") assert_equal(tmpdir+"/.irb#{IRB::IRBRC_EXT}", IRB.rc_file) assert_equal(tmpdir+"/.irb_history", IRB.rc_file("_history")) + assert_file.not_exist?(tmpdir+"/xdg") end end |