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/function-to-plugin.fish

32 lines
642 B
Fish

set -l path $DIRNAME/.t-$TESTNAME-(random)
function -S setup
mkdir -p $path
function foobar
echo foobar
end
end
function -S teardown
rm -rf $path
functions -e foobar
end
test "$TESTNAME - Return the path where the plugin was created"
$path/foobar = (
pushd $path
__fisher_function_to_plugin foobar
popd
)
end
test "$TESTNAME - Create a file with the contents of the given function"
(functions foobar | xargs) = (
pushd $path
set -l plugin_path (__fisher_function_to_plugin foobar)
cat $plugin_path/foobar.fish | xargs
popd
)
end