1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* test/readline/test_readline.rb: Restore environment variables:

COLUMNS LINES


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49958 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
akr 2015-03-13 03:29:43 +00:00
parent dc8d595461
commit 5fdf367348
2 changed files with 8 additions and 0 deletions

View file

@ -1,3 +1,8 @@
Fri Mar 13 12:29:07 2015 Tanaka Akira <akr@fsij.org>
* test/readline/test_readline.rb: Restore environment variables:
COLUMNS LINES
Fri Mar 13 11:37:46 2015 Nobuyoshi Nakada <nobu@ruby-lang.org> Fri Mar 13 11:37:46 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
* ext/fiddle/extconf.rb: needs --enable-shared when linked to * ext/fiddle/extconf.rb: needs --enable-shared when linked to

View file

@ -9,8 +9,10 @@ end
class TestReadline < Test::Unit::TestCase class TestReadline < Test::Unit::TestCase
INPUTRC = "INPUTRC" INPUTRC = "INPUTRC"
SAVED_ENV = %w[COLUMNS LINES]
def setup def setup
@saved_env = ENV.values_at(*SAVED_ENV)
@inputrc, ENV[INPUTRC] = ENV[INPUTRC], IO::NULL @inputrc, ENV[INPUTRC] = ENV[INPUTRC], IO::NULL
end end
@ -24,6 +26,7 @@ class TestReadline < Test::Unit::TestCase
end end
Readline.input = nil Readline.input = nil
Readline.output = nil Readline.output = nil
SAVED_ENV.each_with_index {|k, i| ENV[k] = @saved_env[i] }
end end
if !/EditLine/n.match(Readline::VERSION) if !/EditLine/n.match(Readline::VERSION)