| 1 | #!/bin/sh |
| 2 | |
| 3 | . "$COMMON/platform.sh" |
| 4 | |
| 5 | set -e |
| 6 | |
| 7 | println >&2 "Tests cases where progress information should be printed" |
| 8 | |
| 9 | echo hello > hello |
| 10 | echo world > world |
| 11 | |
| 12 | zstd -q hello world |
| 13 | |
| 14 | for args in \ |
| 15 | "--progress" \ |
| 16 | "--fake-stderr-is-console" \ |
| 17 | "--progress --fake-stderr-is-console -q"; do |
| 18 | println >&2 "args = $args" |
| 19 | println >&2 "compress file to file" |
| 20 | zstd $args -f hello |
| 21 | println >&2 "compress pipe to pipe" |
| 22 | zstd $args < hello > $INTOVOID |
| 23 | println >&2 "compress pipe to file" |
| 24 | zstd $args < hello -fo hello.zst |
| 25 | println >&2 "compress file to pipe" |
| 26 | zstd $args hello -c > $INTOVOID |
| 27 | println >&2 "compress 2 files" |
| 28 | zstd $args -f hello world |
| 29 | |
| 30 | println >&2 "decompress file to file" |
| 31 | zstd $args -d -f hello.zst |
| 32 | println >&2 "decompress pipe to pipe" |
| 33 | zstd $args -d < hello.zst > $INTOVOID |
| 34 | println >&2 "decompress pipe to file" |
| 35 | zstd $args -d < hello.zst -fo hello |
| 36 | println >&2 "decompress file to pipe" |
| 37 | zstd $args -d hello.zst -c > $INTOVOID |
| 38 | println >&2 "decompress 2 files" |
| 39 | zstd $args -d -f hello.zst world.zst |
| 40 | println >&2 "" |
| 41 | done |