xref: /aosp_15_r20/external/zstd/tests/cli-tests/progress/no-progress.sh (revision 01826a4963a0d8a59bc3812d29bdf0fb76416722)
1*01826a49SYabin Cui#!/bin/sh
2*01826a49SYabin Cui
3*01826a49SYabin Cui#!/bin/sh
4*01826a49SYabin Cui
5*01826a49SYabin Cui. "$COMMON/platform.sh"
6*01826a49SYabin Cui
7*01826a49SYabin Cuiset -e
8*01826a49SYabin Cui
9*01826a49SYabin Cuiecho hello > hello
10*01826a49SYabin Cuiecho world > world
11*01826a49SYabin Cui
12*01826a49SYabin Cuizstd -q hello world
13*01826a49SYabin Cui
14*01826a49SYabin Cuiprintln >&2 "Tests cases where progress information should not be printed"
15*01826a49SYabin Cui
16*01826a49SYabin Cuifor args in \
17*01826a49SYabin Cui	"" \
18*01826a49SYabin Cui	"--fake-stderr-is-console -q" \
19*01826a49SYabin Cui	"--fake-stderr-is-console -qq --progress" \
20*01826a49SYabin Cui	"--no-progress --fake-stderr-is-console" \
21*01826a49SYabin Cui	"--no-progress --fake-stderr-is-console -v"
22*01826a49SYabin Cuido
23*01826a49SYabin Cui	println >&2 "args = $args"
24*01826a49SYabin Cui	println >&2 "compress file to file"
25*01826a49SYabin Cui	zstd $args -f hello
26*01826a49SYabin Cui	println >&2 "compress pipe to pipe"
27*01826a49SYabin Cui	zstd $args < hello > $INTOVOID
28*01826a49SYabin Cui	println >&2 "compress pipe to file"
29*01826a49SYabin Cui	zstd $args < hello -fo hello.zst
30*01826a49SYabin Cui	println >&2 "compress file to pipe"
31*01826a49SYabin Cui	zstd $args hello -c > $INTOVOID
32*01826a49SYabin Cui	println >&2 "compress 2 files"
33*01826a49SYabin Cui	zstd $args -f hello world
34*01826a49SYabin Cui
35*01826a49SYabin Cui	println >&2 "decompress file to file"
36*01826a49SYabin Cui	zstd $args -d -f hello.zst
37*01826a49SYabin Cui	println >&2 "decompress pipe to pipe"
38*01826a49SYabin Cui	zstd $args -d < hello.zst > $INTOVOID
39*01826a49SYabin Cui	println >&2 "decompress pipe to file"
40*01826a49SYabin Cui	zstd $args -d < hello.zst -fo hello
41*01826a49SYabin Cui	println >&2 "decompress file to pipe"
42*01826a49SYabin Cui	zstd $args -d hello.zst -c > $INTOVOID
43*01826a49SYabin Cui	println >&2 "decompress 2 files"
44*01826a49SYabin Cui	zstd $args -d -f hello.zst world.zst
45*01826a49SYabin Cui	println >&2 ""
46*01826a49SYabin Cuidone
47