diff options
author | aycabta <aycabta@gmail.com> | 2020-03-21 18:31:20 +0900 |
---|---|---|
committer | aycabta <aycabta@gmail.com> | 2020-03-26 17:41:21 +0900 |
commit | 9339a7d9d48fe5f7ed86b51a7a96e931742f8091 (patch) | |
tree | 96d6d597f4f557dc0981c8481a231093bab8171d | |
parent | 90913bfabe427993e82d4a72616739ee49e61a5d (diff) |
[ruby/reline] Add yamatanooroti rendering test
https://github.com/ruby/reline/commit/f092519525
-rw-r--r-- | test/reline/yamatanooroti/test_rendering.rb | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/test/reline/yamatanooroti/test_rendering.rb b/test/reline/yamatanooroti/test_rendering.rb new file mode 100644 index 0000000000..07121c5b13 --- /dev/null +++ b/test/reline/yamatanooroti/test_rendering.rb @@ -0,0 +1,37 @@ +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 |