waveterm/tests/copytests/cases/test026.sh
Evan Simkowitz 71e126072e
Add S3 fileshare implementation, improve cp behavior (#1896)
Adds the S3 `fileshare` implementation

This also updates `wsh file cp` so it behaves more like `cp` for things
like copying directories and directory entries. It's not meant to align
with `cp` on everything, though. Our `wsh cp` will be recursive and will
create intermediate directories by default.

This also adds new aliases for `wsh view`: `wsh preview` and `wsh open`

---------

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: sawka <mike@commandline.dev>
Co-authored-by: Sylvia Crowe <software@oneirocosm.com>
2025-02-14 17:27:02 -08:00

15 lines
345 B
Bash
Executable file

# copy into an non-existing directory ending with a /
# ensure the file is copied to a file inside the directory
# note that this is not regular cp behavior
set -e
cd "$HOME/testcp"
touch foo.txt
# this is different from cp behavior
wsh file copy foo.txt baz/
if [ ! -f baz/foo.txt ]; then
echo "baz/foo.txt does not exist"
exit 1
fi