diff options
Diffstat (limited to 'test/acceptance/acceptance_test.rb')
-rw-r--r-- | test/acceptance/acceptance_test.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/acceptance/acceptance_test.rb b/test/acceptance/acceptance_test.rb index ba3ec01..13af803 100644 --- a/test/acceptance/acceptance_test.rb +++ b/test/acceptance/acceptance_test.rb @@ -1,3 +1,4 @@ +# coding: utf-8 require 'minitest' require 'minitest/autorun' require 'ttytest' @@ -446,6 +447,15 @@ class FzyTest < Minitest::Test TTY end + def test_show_info + @tty = interactive_fzy(input: %w[foo bar baz], args: "-i") + @tty.assert_matches ">\n[3/3]\nfoo\nbar\nbaz" + @tty.send_keys("ba") + @tty.assert_matches "> ba\n[2/3]\nbar\nbaz" + @tty.send_keys("q") + @tty.assert_matches "> baq\n[0/3]" + end + def test_help @tty = TTYtest.new_terminal(%{#{FZY_PATH} --help}) @tty.assert_matches <<TTY @@ -458,6 +468,7 @@ Usage: fzy [OPTION]... -s, --show-scores Show the scores of each match -0, --read-null Read input delimited by ASCII NUL characters -j, --workers NUM Use NUM workers for searching. (default is # of CPUs) + -i, --show-info Show selection info line -h, --help Display this help and exit -v, --version Output version information and exit TTY |