gzip: add test that checks that -9 compresses better than -1
authorNatanael Copa <ncopa@alpinelinux.org>
Wed, 3 Aug 2016 14:21:53 +0000 (16:21 +0200)
committerDenys Vlasenko <vda.linux@googlemail.com>
Sun, 14 Aug 2016 23:31:17 +0000 (01:31 +0200)
Signed-off-by: Natanael Copa <ncopa@alpinelinux.org>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
testsuite/gzip/gzip-compression-levels [new file with mode: 0644]

diff --git a/testsuite/gzip/gzip-compression-levels b/testsuite/gzip/gzip-compression-levels
new file mode 100644 (file)
index 0000000..6d9a13d
--- /dev/null
@@ -0,0 +1,5 @@
+# FEATURE: CONFIG_FEATURE_GZIP_LEVELS
+
+level1=$(busybox gzip -c -1 $(which busybox) | wc -c)
+level9=$(busybox gzip -c -9 $(which busybox) | wc -c)
+test $level1 -gt $level9