feat: add plugins for zsh
This commit is contained in:
27
.zsh/zsh-fzf-tab/test/runtests.zsh
Normal file
27
.zsh/zsh-fzf-tab/test/runtests.zsh
Normal file
@@ -0,0 +1,27 @@
|
||||
#!/bin/zsh -f
|
||||
|
||||
emulate zsh
|
||||
|
||||
# Run all specified tests, keeping count of which succeeded.
|
||||
# The reason for this extra layer above the test script is to
|
||||
# protect from catastrophic failure of an individual test.
|
||||
# We could probably do that with subshells instead.
|
||||
|
||||
integer success failure skipped retval
|
||||
for file in ${@:1}; do
|
||||
zsh +Z -f ./ztst.zsh $file
|
||||
retval=$?
|
||||
if (( $retval == 2 )); then
|
||||
(( skipped++ ))
|
||||
elif (( $retval )); then
|
||||
(( failure++ ))
|
||||
else
|
||||
(( success++ ))
|
||||
fi
|
||||
done
|
||||
print "**************************************
|
||||
$success successful test script${${success:#1}:+s}, \
|
||||
$failure failure${${failure:#1}:+s}, \
|
||||
$skipped skipped
|
||||
**************************************"
|
||||
return $(( failure ? 1 : 0 ))
|
||||
Reference in New Issue
Block a user