You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
fisher/test/path-update.fish

27 lines
566 B
Fish

set -g path $DIRNAME/.t-$TESTNAME-(random)
function -S setup
mkdir -p $path/foo
function git
if test (pwd) = $path/foo
switch "$argv"
case "checkout master --quiet"
printf checkout-
case "pull --rebase origin master --quiet"
printf pull-rebase
end
end
end
end
function -S teardown
functions -e git
rm -rf $path
end
test "$TESTNAME - Use Git to update given path"
"checkout-pull-rebase" = (__fisher_path_update $path/foo)
end