waveterm/tests/copytests/cases/test027.sh
Sylvie Crowe 9e79df0684
feat: add tests for local wsh file copy cmd (#1911)
This adds tests for the corner cases of the `wsh file copy` command. At
the moment, these focus on local copies since they are more easily
replicated.

---------

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
2025-02-06 15:28:26 -08:00

13 lines
253 B
Bash
Executable file

# copy into an non-existing file name not-ending with a /
# ensure the file is copied to a file instead of a directory
set -e
cd "$HOME/testcp"
touch foo.txt
wsh file copy foo.txt baz
if [ ! -f baz ]; then
echo "baz does not exist"
exit 1
fi