diff options
Diffstat (limited to 'test/reline/yamatanooroti')
-rwxr-xr-x | test/reline/yamatanooroti/multiline_repl | 9 | ||||
-rw-r--r-- | test/reline/yamatanooroti/test_rendering.rb | 34 |
2 files changed, 43 insertions, 0 deletions
diff --git a/test/reline/yamatanooroti/multiline_repl b/test/reline/yamatanooroti/multiline_repl index 2e826793fa..da886b8f06 100755 --- a/test/reline/yamatanooroti/multiline_repl +++ b/test/reline/yamatanooroti/multiline_repl @@ -55,6 +55,15 @@ opt.on('--dialog VAL') { |v| natural to read and easy to write. RUBY + elsif v.include?('fullwidth') + contents = <<~RUBY.split("\n") + Rubyとは... + + オープンソースの動的なプログラミン + グ言語で、シンプルさと高い生産性を + 備えています。エレガントな文法を持 + ち、自然に読み書きができます。 + RUBY end if v.include?('scrollkey') dialog.trap_key = nil diff --git a/test/reline/yamatanooroti/test_rendering.rb b/test/reline/yamatanooroti/test_rendering.rb index d716ac5a0a..e1dde83589 100644 --- a/test/reline/yamatanooroti/test_rendering.rb +++ b/test/reline/yamatanooroti/test_rendering.rb @@ -935,6 +935,40 @@ begin EOC end + def test_dialog_with_fullwidth_chars + ENV['RELINE_TEST_PROMPT'] = '> ' + start_terminal(30, 5, %W{ruby -I#{@pwd}/lib #{@pwd}/test/reline/yamatanooroti/multiline_repl --dialog fullwidth,scrollkey,scrollbar}, startup_message: 'Multiline REPL.') + 6.times{ write('j') } + close + assert_screen(<<~'EOC') + Multi + line + REPL. + > + オー + グ言▄ + 備え█ + ち、█ + EOC + end + + def test_dialog_with_fullwidth_chars_split + ENV['RELINE_TEST_PROMPT'] = '> ' + start_terminal(30, 6, %W{ruby -I#{@pwd}/lib #{@pwd}/test/reline/yamatanooroti/multiline_repl --dialog fullwidth,scrollkey,scrollbar}, startup_message: 'Multiline REPL.') + 6.times{ write('j') } + close + assert_screen(<<~'EOC') + Multil + ine RE + PL. + > + オー + グ言 ▄ + 備え █ + ち、 █ + EOC + end + def test_autocomplete_empty start_terminal(20, 30, %W{ruby -I#{@pwd}/lib #{@pwd}/test/reline/yamatanooroti/multiline_repl --autocomplete}, startup_message: 'Multiline REPL.') write('Street') |