summaryrefslogtreecommitdiffstatshomepage
path: root/3rdparty/zstd/tests/cli-tests/compression/format.sh
diff options
context:
space:
mode:
Diffstat (limited to '3rdparty/zstd/tests/cli-tests/compression/format.sh')
-rwxr-xr-x3rdparty/zstd/tests/cli-tests/compression/format.sh16
1 files changed, 16 insertions, 0 deletions
diff --git a/3rdparty/zstd/tests/cli-tests/compression/format.sh b/3rdparty/zstd/tests/cli-tests/compression/format.sh
new file mode 100755
index 00000000000..192fa2cf29f
--- /dev/null
+++ b/3rdparty/zstd/tests/cli-tests/compression/format.sh
@@ -0,0 +1,16 @@
+#!/bin/sh
+
+. "$COMMON/format.sh"
+
+set -e
+
+# Test --format
+zstd --format=zstd file -f
+zstd -t file.zst
+for format in "gzip" "lz4" "xz" "lzma"; do
+ if zstd_supports_format $format; then
+ zstd --format=$format file
+ zstd -t file.$(format_extension $format)
+ zstd -c --format=$format file | zstd -t --format=$format
+ fi
+done