From 7fbd58b5513c17e92fa23ec764237f5cb4a48664 Mon Sep 17 00:00:00 2001 From: John Hawthorn Date: Tue, 7 Feb 2017 18:31:42 -0800 Subject: Add acceptance test for initial query --- test/acceptance/acceptance_test.rb | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'test') 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 <