summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorJohn Hawthorn <john@hawthorn.email>2018-09-09 13:05:12 -0700
committerJohn Hawthorn <john@hawthorn.email>2018-09-09 13:32:10 -0700
commit757b31309434d7adcd1361be26c1cd2a44d6ec9b (patch)
tree6fb282e9ae75c879aa9a78695a72c1f9f39a8bce /test
parent42e9ffd27db2c9634ddc8f82cd736a2caa6728cc (diff)
Disable line wrap when printing candidates
This solves the line wrapping issue with much simpler code, which also works better with Unicode characters and when the terminal is resized.
Diffstat (limited to 'test')
-rw-r--r--test/acceptance/acceptance_test.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/acceptance/acceptance_test.rb b/test/acceptance/acceptance_test.rb
index 6123b2d..6ab8b34 100644
--- a/test/acceptance/acceptance_test.rb
+++ b/test/acceptance/acceptance_test.rb
@@ -430,6 +430,18 @@ class FzyTest < Minitest::Test
@tty.assert_cursor_position(y: 0, x: 8)
end
+ def test_long_strings
+ ascii = "LongStringOfText" * 6
+ unicode = "LongStringOfText" * 3
+
+ @tty = interactive_fzy(input: [ascii, unicode])
+ @tty.assert_matches <<~TTY
+ >
+ LongStringOfTextLongStringOfTextLongStringOfTextLongStringOfTextLongStringOfText
+ LongStringOfTextLongStringOfTextLongStri
+ TTY
+ end
+
def test_help
@tty = TTYtest.new_terminal(%{#{FZY_PATH} --help})
@tty.assert_matches <<TTY