Skip to content

Commit

Permalink
Add --nomultiline indent and prompt test (#699)
Browse files Browse the repository at this point in the history
  • Loading branch information
tompng authored Aug 29, 2023
1 parent 59bcc07 commit 9b4aea7
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions test/irb/yamatanooroti/test_rendering.rb
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,35 @@ def test_launch
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'
Expand Down

0 comments on commit 9b4aea7

Please sign in to comment.