[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:
parent
51e7fb5331
commit
062eec7558
@ -47,6 +47,35 @@ class IRB::RenderingTest < Yamatanooroti::TestCase
|
|||||||
EOC
|
EOC
|
||||||
end
|
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
|
def test_multiline_paste
|
||||||
write_irbrc <<~'LINES'
|
write_irbrc <<~'LINES'
|
||||||
puts 'start IRB'
|
puts 'start IRB'
|
||||||
|
Loading…
x
Reference in New Issue
Block a user