mirror of
https://github.com/facebook/zstd.git
synced 2025-07-30 22:23:13 +03:00
[test] Add new CLI testing platform
Adds the new CLI testing platform that I'm proposing. See the added `README.md` for details.
This commit is contained in:
28
tests/cli-tests/compression/basic.sh
Executable file
28
tests/cli-tests/compression/basic.sh
Executable file
@ -0,0 +1,28 @@
|
||||
#!/bin/sh -e
|
||||
|
||||
# Uncomment the set -x line for debugging
|
||||
# set -x
|
||||
|
||||
# Test compression flags and check that they work
|
||||
zstd file ; zstd -t file.zst
|
||||
zstd -f file ; zstd -t file.zst
|
||||
zstd -f -z file ; zstd -t file.zst
|
||||
zstd -f -k file ; zstd -t file.zst
|
||||
zstd -f -C file ; zstd -t file.zst
|
||||
zstd -f --check file ; zstd -t file.zst
|
||||
zstd -f --no-check file ; zstd -t file.zst
|
||||
zstd -f -- file ; zstd -t file.zst
|
||||
|
||||
# Test output file compression
|
||||
zstd -o file-out.zst ; zstd -t file-out.zst
|
||||
zstd -fo file-out.zst; zstd -t file-out.zst
|
||||
|
||||
# Test compression to stdout
|
||||
zstd -c file | zstd -t
|
||||
zstd --stdout file | zstd -t
|
||||
println bob | zstd | zstd -t
|
||||
|
||||
# Test --rm
|
||||
cp file file-rm
|
||||
zstd --rm file-rm; zstd -t file-rm.zst
|
||||
test ! -f file-rm
|
Reference in New Issue
Block a user