diff options
-rw-r--r-- | src/options.c | 2 | ||||
-rw-r--r-- | test/acceptance/acceptance_test.rb | 16 |
2 files changed, 17 insertions, 1 deletions
diff --git a/src/options.c b/src/options.c index 1ef1550..504e646 100644 --- a/src/options.c +++ b/src/options.c @@ -15,7 +15,7 @@ static const char *usage_str = " -e, --show-matches=QUERY Output the sorted matches of QUERY\n" " -t, --tty=TTY Specify file to use as TTY device (default /dev/tty)\n" " -s, --show-scores Show the scores of each match\n" - " -j, --workers NUM Use NUM workers for searching. (default is number of CPU threads)\n" + " -j, --workers NUM Use NUM workers for searching. (default is # of CPUs)\n" " -h, --help Display this help and exit\n" " -v, --version Output version information and exit\n"; diff --git a/test/acceptance/acceptance_test.rb b/test/acceptance/acceptance_test.rb index f5ec243..f0e87d0 100644 --- a/test/acceptance/acceptance_test.rb +++ b/test/acceptance/acceptance_test.rb @@ -228,4 +228,20 @@ class FzyTest < Minitest::Test @tty.send_keys("baz") @tty.assert_matches "foo bar baz" end + + def test_help + @tty = TTYtest.new_terminal(%{#{FZY_PATH} --help}) + @tty.assert_matches <<TTY +Usage: fzy [OPTION]... + -l, --lines=LINES Specify how many lines of results to show (default 10) + -p, --prompt=PROMPT Input prompt (default '> ') + -q, --query=QUERY Use QUERY as the initial search string + -e, --show-matches=QUERY Output the sorted matches of QUERY + -t, --tty=TTY Specify file to use as TTY device (default /dev/tty) + -s, --show-scores Show the scores of each match + -j, --workers NUM Use NUM workers for searching. (default is # of CPUs) + -h, --help Display this help and exit + -v, --version Output version information and exit +TTY + end end |