fzy
terminal fuzzy finder picker
git clone https://9o.is/git/fzy.git
commit 1118de20749c2bb2e6a1f429875ceaa6943b27b7 parent 5d62062b5611cf4a1d86f7ee28c89a1ee91a1936 Author: John Hawthorn <john.hawthorn@gmail.com> Date: Tue, 7 Feb 2017 18:28:21 -0800 Add Acceptance test large inputs and worker counts Diffstat:
| M | test/acceptance/acceptance_test.rb | | | 26 | ++++++++++++++++++++++++++ |
1 file changed, 26 insertions(+), 0 deletions(-)
diff --git a/test/acceptance/acceptance_test.rb b/test/acceptance/acceptance_test.rb @@ -245,6 +245,32 @@ class FzyTest < Minitest::Test @tty.assert_matches "> f\n#{expected_score} foo" end + def test_large_input + @tty = TTYtest.new_terminal(%{seq 100000 | #{FZY_PATH} -l 3}) + @tty.send_keys('34') + @tty.assert_matches "> 34\n34\n340\n341" + + @tty.send_keys('5') + @tty.assert_matches "> 345\n345\n3450\n3451" + + @tty.send_keys('z') + @tty.assert_matches "> 345z" + end + + def test_worker_count + @tty = TTYtest.new_terminal(%{echo -n "foo\nbar" | #{FZY_PATH} -j1}) + @tty.send_keys('foo') + @tty.assert_matches "> foo\nfoo" + + @tty = TTYtest.new_terminal(%{seq 100000 | #{FZY_PATH} -j1 -l3}) + @tty.send_keys('34') + @tty.assert_matches "> 34\n34\n340\n341" + + @tty = TTYtest.new_terminal(%{seq 100000 | #{FZY_PATH} -j200 -l3}) + @tty.send_keys('34') + @tty.assert_matches "> 34\n34\n340\n341" + end + def test_help @tty = TTYtest.new_terminal(%{#{FZY_PATH} --help}) @tty.assert_matches <<TTY