summaryrefslogtreecommitdiff
path: root/test/irb
diff options
context:
space:
mode:
authoraycabta <aycabta@gmail.com>2021-07-15 23:42:11 +0900
committergit <svn-admin@ruby-lang.org>2021-07-16 01:55:25 +0900
commitf1035248af04b2a4d58990740c3f1b840a5eac78 (patch)
tree30353f5f516a3897233592ffe0eefdd8738be1ee /test/irb
parent456d0019dddec74b80583f02ffdb7d84b096ab32 (diff)
[ruby/irb] Show code page by irb_info on Windows
https://github.com/ruby/irb/commit/6160d74199
Diffstat (limited to 'test/irb')
-rw-r--r--test/irb/test_cmd.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/irb/test_cmd.rb b/test/irb/test_cmd.rb
index adf671f205..e6bb587b5c 100644
--- a/test/irb/test_cmd.rb
+++ b/test/irb/test_cmd.rb
@@ -47,6 +47,7 @@ module TestIRB
@default_encoding = [Encoding.default_external, Encoding.default_internal]
@stdio_encodings = [STDIN, STDOUT, STDERR].map {|io| [io.external_encoding, io.internal_encoding] }
IRB.instance_variable_get(:@CONF).clear
+ @is_win = (RbConfig::CONFIG['host_os'] =~ /mswin|msys|mingw|cygwin|bccwin|wince|emc/)
end
def teardown
@@ -80,6 +81,7 @@ module TestIRB
InputMethod:\sAbstract\sInputMethod\n
\.irbrc\spath:\s.+\n
RUBY_PLATFORM:\s.+\n
+ #{@is_win ? 'Code\spage:\s\d+\n' : ''}
}x
assert_match expected, irb.context.main.irb_info.to_s
ensure
@@ -105,6 +107,7 @@ module TestIRB
InputMethod:\sAbstract\sInputMethod\n
\.irbrc\spath:\s.+\n
RUBY_PLATFORM:\s.+\n
+ #{@is_win ? 'Code\spage:\s\d+\n' : ''}
}x
assert_match expected, irb.context.main.irb_info.to_s
ensure
@@ -132,6 +135,7 @@ module TestIRB
IRB\sversion:\sirb\s.+\n
InputMethod:\sAbstract\sInputMethod\n
RUBY_PLATFORM:\s.+\n
+ #{@is_win ? 'Code\spage:\s\d+\n' : ''}
\z
}x
assert_match expected, irb.context.main.irb_info.to_s
@@ -163,6 +167,7 @@ module TestIRB
IRB\sversion:\sirb\s.+\n
InputMethod:\sAbstract\sInputMethod\n
RUBY_PLATFORM:\s.+\n
+ #{@is_win ? 'Code\spage:\s\d+\n' : ''}
\z
}x
assert_match expected, irb.context.main.irb_info.to_s