fisher/test/help-parse.fish
Jorge Bucaran e0ed629777
One more push before 0.8.0, fixed bugs, paved the way for DEBUG mode.
* Add Mizuki to THANKS for help with Japanese translation of the QuickStart Guide.
* fisher --list should return 1 (fail) if no plugins are installed. Closes #101.
* More consistent style 'Usage' instead of 'usage'.
* Silence index check in case $fisher_cache/.index does not exist.
* Add more descriptive message if plugin is not found.
* Silence search failure in case $fisher_cache/.index does not exist.
2016-02-15 21:24:22 +09:00

25 lines
700 B
Fish

function -S setup
function foo
printf "%s\n" "Usage foo [options] ..."
printf "%s\n" "Options:"
printf "%s\n" " --version Show version"
printf "%s\n" " -h --help Show help"
end
end
function -S teardown
functions -e foo
end
test "$TESTNAME - Parse single long option with description"
(foo | __fisher_help_parse | sed -n 1p) = "Show version;version;"
end
test "$TESTNAME - Parse short and long option with description "
(foo | __fisher_help_parse | sed -n 2p) = "Show help;help;h"
end
test "$TESTNAME - Ignore non-option info, e.g, usage:, options:, etc."
(foo | __fisher_help_parse | xargs) = "Show version;version; Show help;help;h"
end