File: progress.sh

package info (click to toggle)
libzstd 1.5.7%2Bdfsg-1.1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 10,352 kB
  • sloc: ansic: 89,030; sh: 3,788; python: 3,466; cpp: 2,927; makefile: 2,329; asm: 390
file content (41 lines) | stat: -rwxr-xr-x 1,031 bytes parent folder | download | duplicates (10)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#!/bin/sh

. "$COMMON/platform.sh"

set -e

println >&2 "Tests cases where progress information should be printed"

echo hello > hello
echo world > world

zstd -q hello world

for args in \
	"--progress" \
	"--fake-stderr-is-console" \
	"--progress --fake-stderr-is-console -q"; do
	println >&2 "args = $args"
	println >&2 "compress file to file"
	zstd $args -f hello
	println >&2 "compress pipe to pipe"
	zstd $args < hello > $INTOVOID
	println >&2 "compress pipe to file"
	zstd $args < hello -fo hello.zst
	println >&2 "compress file to pipe"
	zstd $args hello -c > $INTOVOID
	println >&2 "compress 2 files"
	zstd $args -f hello world

	println >&2 "decompress file to file"
	zstd $args -d -f hello.zst
	println >&2 "decompress pipe to pipe"
	zstd $args -d < hello.zst > $INTOVOID
	println >&2 "decompress pipe to file"
	zstd $args -d < hello.zst -fo hello
	println >&2 "decompress file to pipe"
	zstd $args -d hello.zst -c > $INTOVOID
	println >&2 "decompress 2 files"
	zstd $args -d -f hello.zst world.zst
	println >&2 ""
done