diff options
author | John Hawthorn <john@hawthorn.email> | 2018-06-17 11:48:06 -0700 |
---|---|---|
committer | John Hawthorn <john@hawthorn.email> | 2018-06-17 12:22:44 -0700 |
commit | 794dc0c06cfc1ea60cf97d98c65bb14b47aa3a69 (patch) | |
tree | 8b9c6d84e05e2aa8ddb67a0db1afa422109b6599 | |
parent | a0e259f93664a6ee8030da8f2b57027753793d3e (diff) |
Add test for user input coming before choices read
-rw-r--r-- | test/acceptance/acceptance_test.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/test/acceptance/acceptance_test.rb b/test/acceptance/acceptance_test.rb index 4a11cac..cac4c26 100644 --- a/test/acceptance/acceptance_test.rb +++ b/test/acceptance/acceptance_test.rb @@ -320,6 +320,13 @@ class FzyTest < Minitest::Test @tty.assert_matches "> foo\nfoo" end + # https://github.com/jhawthorn/fzy/issues/81 + def test_slow_stdin_fast_user + @tty = TTYtest.new_terminal(%{(echo aa; echo bc; echo bd; sleep 0.5) | #{FZY_PATH}}) + @tty.send_keys("b\r") + @tty.assert_matches "bc" + end + def test_help @tty = TTYtest.new_terminal(%{#{FZY_PATH} --help}) @tty.assert_matches <<TTY |