waveterm/tests/copytests/cases/test051.sh
Sylvie Crowe 8b262445d5
feat: print test text when the test fails (#1927)
Adds the following changes to copy tests:
- print the body of the test if the test fails
- add a count of how many tests passed out of the total
- remove the -r flag from the tests
2025-02-07 14:45:47 -08:00

16 lines
282 B
Bash
Executable file

# copy the current directory into a non-existing directory
# ensure the copy succeeds and the output exists
set -e
cd "$HOME/testcp"
mkdir foo
touch foo/bar.txt
cd foo
wsh file copy . ../baz
cd ..
if [ ! -f baz/bar.txt ]; then
echo "baz/bar.txt does not exist"
exit 1
fi