mirror of
https://github.com/wavetermdev/waveterm.git
synced 2025-11-28 05:00:26 +08:00
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>
15 lines
277 B
Bash
Executable file
15 lines
277 B
Bash
Executable file
# copy a file with /// to a file with //
|
|
# ensure the copy succeeds and the file exists
|
|
|
|
set -e
|
|
cd "$HOME/testcp"
|
|
mkdir foo
|
|
touch foo/bar.txt
|
|
mkdir baz
|
|
|
|
wsh file copy foo///bar.txt baz//qux.txt
|
|
|
|
if [ ! -f baz/qux.txt ]; then
|
|
echo "baz/qux.txt does not exist"
|
|
exit 1
|
|
fi
|