Skip to content

Commit

Permalink
Test IRB's behaviour with empty input
Browse files Browse the repository at this point in the history
  • Loading branch information
st0012 committed Feb 16, 2024
1 parent ebffd3d commit 594a538
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions test/irb/test_irb.rb
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,24 @@ def test_symbol_aliases_dont_affect_ruby_syntax
assert_include output, "=> \"It's a foo\""
assert_include output, "=> \"It's a bar\""
end

def test_empty_input_echoing_behaviour
write_ruby <<~'RUBY'
binding.irb
RUBY

output = run_ruby_file do
type ""
type " "
type "exit"
end

# Input cramped together due to how Reline's Reline::GeneralIO works
assert_include(
output,
"irb(main):001> irb(main):002> irb(main):002> irb(main):002> => nil\r\n"
)
end
end

class IrbIOConfigurationTest < TestCase
Expand Down

0 comments on commit 594a538

Please sign in to comment.