Skip to content

Commit

Permalink
[ruby/irb] Escape space in free-spacing mode
Browse files Browse the repository at this point in the history
  • Loading branch information
aycabta authored and matzbot committed Jul 15, 2021
1 parent feec80a commit 456d001
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions test/irb/test_cmd.rb
Expand Up @@ -75,11 +75,11 @@ def test_irb_info_multiline
irb = IRB::Irb.new(workspace, TestInputMethod.new([]))
IRB.conf[:MAIN_CONTEXT] = irb.context
expected = %r{
Ruby\sversion: .+\n
IRB\sversion:\sirb .+\n
Ruby\sversion:\s.+\n
IRB\sversion:\sirb\s.+\n
InputMethod:\sAbstract\sInputMethod\n
\.irbrc\spath: .+\n
RUBY_PLATFORM: .+
\.irbrc\spath:\s.+\n
RUBY_PLATFORM:\s.+\n
}x
assert_match expected, irb.context.main.irb_info.to_s
ensure
Expand All @@ -100,11 +100,11 @@ def test_irb_info_singleline
irb = IRB::Irb.new(workspace, TestInputMethod.new([]))
IRB.conf[:MAIN_CONTEXT] = irb.context
expected = %r{
Ruby\sversion: .+\n
IRB\sversion:\sirb .+\n
Ruby\sversion:\s.+\n
IRB\sversion:\sirb\s.+\n
InputMethod:\sAbstract\sInputMethod\n
\.irbrc\spath: .+\n
RUBY_PLATFORM: .+
\.irbrc\spath:\s.+\n
RUBY_PLATFORM:\s.+\n
}x
assert_match expected, irb.context.main.irb_info.to_s
ensure
Expand All @@ -128,10 +128,10 @@ def test_irb_info_multiline_without_rc_files
irb = IRB::Irb.new(workspace, TestInputMethod.new([]))
IRB.conf[:MAIN_CONTEXT] = irb.context
expected = %r{
Ruby\sversion: .+\n
IRB\sversion:\sirb .+\n
Ruby\sversion:\s.+\n
IRB\sversion:\sirb\s.+\n
InputMethod:\sAbstract\sInputMethod\n
RUBY_PLATFORM: .+\n
RUBY_PLATFORM:\s.+\n
\z
}x
assert_match expected, irb.context.main.irb_info.to_s
Expand Down Expand Up @@ -159,10 +159,10 @@ def test_irb_info_singleline_without_rc_files
irb = IRB::Irb.new(workspace, TestInputMethod.new([]))
IRB.conf[:MAIN_CONTEXT] = irb.context
expected = %r{
Ruby\sversion: .+\n
IRB\sversion:\sirb .+\n
Ruby\sversion:\s.+\n
IRB\sversion:\sirb\s.+\n
InputMethod:\sAbstract\sInputMethod\n
RUBY_PLATFORM: .+\n
RUBY_PLATFORM:\s.+\n
\z
}x
assert_match expected, irb.context.main.irb_info.to_s
Expand Down

0 comments on commit 456d001

Please sign in to comment.