ruby-changes:60511
From: aycabta <ko1@a...>
Date: Thu, 26 Mar 2020 17:44:36 +0900 (JST)
Subject: [ruby-changes:60511] 9339a7d9d4 (master): [ruby/reline] Add yamatanooroti rendering test
https://git.ruby-lang.org/ruby.git/commit/?id=9339a7d9d4 From 9339a7d9d48fe5f7ed86b51a7a96e931742f8091 Mon Sep 17 00:00:00 2001 From: aycabta <aycabta@g...> Date: Sat, 21 Mar 2020 18:31:20 +0900 Subject: [ruby/reline] Add yamatanooroti rendering test https://github.com/ruby/reline/commit/f092519525 diff --git a/test/reline/yamatanooroti/test_rendering.rb b/test/reline/yamatanooroti/test_rendering.rb new file mode 100644 index 0000000..07121c5 --- /dev/null +++ b/test/reline/yamatanooroti/test_rendering.rb @@ -0,0 +1,37 @@ https://github.com/ruby/ruby/blob/trunk/test/reline/yamatanooroti/test_rendering.rb#L1 +begin + require 'yamatanooroti' + + class Yamatanooroti::TestMultiplatform < Yamatanooroti::TestCase + def setup + inputrc_backup = ENV['INPUTRC'] + ENV['INPUTRC'] = 'nonexistent_file' + start_terminal(5, 30, %w{ruby -Ilib bin/multiline_repl}) + sleep 0.5 + ENV['INPUTRC'] = inputrc_backup + end + + def test_history_back + write(":a\n") + write("\C-p") + close + assert_screen(<<~EOC) + Multiline REPL. + prompt> :a + => :a + prompt> :a + EOC + end + + def test_backspace + write(":abc\C-h\n") + close + assert_screen(<<~EOC) + Multiline REPL. + prompt> :ab + => :ab + prompt> + EOC + end + end +rescue LoadError, NameError # yamatanooroti gem not found +end -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/