fisher/test/wait.fish
Jorge Bucaran 707855203a Ahoy! Fisherman gets a super patch v0.3.1
This patch contains several amends for 0.3.0 and
other minor documentation corrections.  Major
documentation revision and rewrite.

fisher help shows fisher(1) by default now.

Fix a critical bug that was causing fisher uninstall
--force to remove not the symbolic link, but the
actual files. Closes #24

Rename orphan tag to custom for plugins installed
using a custom URL.

warning Remove fisher --link flag and create symbolic
links by default for local paths. The user does not
have to worry about symbolic links or whether the
copy is as symbolic link or not anymore. If the user
tries to install a local path, then the best thing
to do is to create a symbolic link. This also
eliminates the need to call update.

warning Remove fisher --cache and fisher --validate.
Now, that these options are separated into their own
function and they are intentionally private, there
is no need for them.
2016-01-10 16:13:46 +09:00

38 lines
982 B
Fish

set -l path $DIRNAME/$TESTNAME.test(random)
function -S setup
if not mkdir -p $path
return 1
end
pushd $path
end
function -S teardown
popd
rm -rf $path
end
test "fail if no commands are given" (
wait
echo $status) = 1
end
test "do not redirect standard output"
(wait "echo output") = output
end
test "fail if there is any output to standard error" (
wait "echo output > &2"
echo $status) = 1
end
test "log standard error to log if <file> is given" (
wait "printf '%s\n' a b c d >&2" --log=$path/log
cat $path/log | xargs) = "1 a 2 b 3 c 4 d"
end
test "display help"
(wait -h | xargs) = "usage: wait <commands> [--spin=<style>] [--time=<delay>] [--log=<file>] [--format=<format>] [--help] -s --spin=<style> Set spinner style -t --time=<delay> Set spinner transition time delay -l --log=<file> Output standard error to <file> -f --format=<format> Use given <format> to display spinner -h --help Show usage help"
end