5 # Uncomment the set -v line for debugging
8 # Test compression flags and check that they work
9 zstd file ; zstd -t file.zst
10 zstd -f file ; zstd -t file.zst
11 zstd -f -z file ; zstd -t file.zst
12 zstd -f -k file ; zstd -t file.zst
13 zstd -f -C file ; zstd -t file.zst
14 zstd -f --check file ; zstd -t file.zst
15 zstd -f --no-check file ; zstd -t file.zst
16 zstd -f -- file ; zstd -t file.zst
18 # Test output file compression
19 zstd -o file-out.zst ; zstd -t file-out.zst
20 zstd -fo file-out.zst; zstd -t file-out.zst
22 # Test compression to stdout
23 zstd -c file | zstd -t
24 zstd --stdout file | zstd -t
25 println bob | zstd | zstd -t
27 # Test keeping input file when compressing to stdout in gzip mode
28 if $(command -v $ZSTD_SYMLINK_DIR/gzip); then
29 $ZSTD_SYMLINK_DIR/gzip -c file | zstd -t ; test -f file
30 $ZSTD_SYMLINK_DIR/gzip --stdout file | zstd -t ; test -f file
35 zstd --rm file-rm; zstd -t file-rm.zst