From 9b4aea753bae79248210465d4cbb94e76a554cb2 Mon Sep 17 00:00:00 2001 From: tomoya ishida Date: Wed, 30 Aug 2023 00:34:45 +0900 Subject: [PATCH] Add --nomultiline indent and prompt test (#699) --- test/irb/yamatanooroti/test_rendering.rb | 29 ++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/test/irb/yamatanooroti/test_rendering.rb b/test/irb/yamatanooroti/test_rendering.rb index 80833d052..279eff651 100644 --- a/test/irb/yamatanooroti/test_rendering.rb +++ b/test/irb/yamatanooroti/test_rendering.rb @@ -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'