[ruby/irb] Add --nomultiline indent and prompt test

(https://github.com/ruby/irb/pull/699)

https://github.com/ruby/irb/commit/9b4aea753b
This commit is contained in:
tomoya ishida 2023-08-30 00:34:45 +09:00 committed by git
parent 51e7fb5331
commit 062eec7558

View File

@ -47,6 +47,35 @@ class IRB::RenderingTest < Yamatanooroti::TestCase
EOC
end
def test_nomultiline
write_irbrc <<~'LINES'
puts 'start IRB'
LINES
start_terminal(25, 80, %W{ruby -I#{@pwd}/lib #{@pwd}/exe/irb --nomultiline}, startup_message: 'start IRB')
write(<<~EOC)
if true
if false
a = "hello
world"
puts a
end
end
EOC
close
assert_screen(<<~EOC)
start IRB
irb(main):001> if true
irb(main):002* if false
irb(main):003* a = "hello
irb(main):004" world"
irb(main):005* puts a
irb(main):006* end
irb(main):007* end
=> nil
irb(main):008>
EOC
end
def test_multiline_paste
write_irbrc <<~'LINES'
puts 'start IRB'