summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorJohn Hawthorn <john.hawthorn@gmail.com>2017-02-07 18:31:42 -0800
committerJohn Hawthorn <john.hawthorn@gmail.com>2017-02-07 18:34:11 -0800
commit7fbd58b5513c17e92fa23ec764237f5cb4a48664 (patch)
tree4a6e8ddc166ad74860017562daa68df71466a07d /test
parent0ae974af9639b4df29657cf2fe0033b8808fd728 (diff)
Add acceptance test for initial query
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 7b6faa8..9309d16 100644
--- a/test/acceptance/acceptance_test.rb
+++ b/test/acceptance/acceptance_test.rb
@@ -271,6 +271,18 @@ class FzyTest < Minitest::Test
@tty.assert_matches "> 34\n34\n340\n341"
end
+ def test_initial_query
+ @tty = TTYtest.new_terminal(%{echo -n "foo\nbar" | #{FZY_PATH} -q fo})
+ @tty.assert_matches "> fo\nfoo"
+ @tty.send_keys("o")
+ @tty.assert_matches "> foo\nfoo"
+ @tty.send_keys("o")
+ @tty.assert_matches "> fooo"
+
+ @tty = TTYtest.new_terminal(%{echo -n "foo\nbar" | #{FZY_PATH} -q asdf})
+ @tty.assert_matches "> asdf"
+ end
+
def test_help
@tty = TTYtest.new_terminal(%{#{FZY_PATH} --help})
@tty.assert_matches <<TTY