From 10a2f3745a6817d452d317718ab9e782b97984c7 Mon Sep 17 00:00:00 2001 From: Zoltan Szabadka Date: Thu, 7 May 2015 20:43:01 +0200 Subject: Handle multiple compressed files per original in the test. Add some more test cases that decompress to the empty file or a one byte long file. These test cases have examples for the updated stream header and meta-block header formats. --- tests/compatibility_test.sh | 26 ++++---------------------- tests/testdata/empty.compressed.00 | 1 + tests/testdata/empty.compressed.01 | 1 + tests/testdata/empty.compressed.02 | 1 + tests/testdata/empty.compressed.03 | 1 + tests/testdata/empty.compressed.04 | 1 + tests/testdata/empty.compressed.05 | 1 + tests/testdata/empty.compressed.06 | 1 + tests/testdata/empty.compressed.07 | 1 + tests/testdata/empty.compressed.08 | 1 + tests/testdata/empty.compressed.09 | 1 + tests/testdata/empty.compressed.10 | 1 + tests/testdata/empty.compressed.11 | 1 + tests/testdata/empty.compressed.12 | 1 + tests/testdata/empty.compressed.13 | 1 + tests/testdata/empty.compressed.14 | 1 + tests/testdata/empty.compressed.15 | 1 + tests/testdata/empty.compressed.16 | Bin 0 -> 4 bytes tests/testdata/empty.compressed.17 | 1 + tests/testdata/empty.compressed.18 | Bin 0 -> 196610 bytes tests/testdata/mapsdatazrh | Bin 0 -> 285886 bytes tests/testdata/mapsdatazrh.compressed | Bin 0 -> 161743 bytes tests/testdata/random_org_10k.bin | Bin 0 -> 10000 bytes tests/testdata/random_org_10k.bin.compressed | Bin 0 -> 10004 bytes tests/testdata/x.compressed.00 | Bin 0 -> 5 bytes tests/testdata/x.compressed.01 | Bin 0 -> 8 bytes tests/testdata/x.compressed.02 | Bin 0 -> 5 bytes tests/testdata/x.compressed.03 | Bin 0 -> 10 bytes 28 files changed, 21 insertions(+), 22 deletions(-) create mode 100644 tests/testdata/empty.compressed.00 create mode 100644 tests/testdata/empty.compressed.01 create mode 100644 tests/testdata/empty.compressed.02 create mode 100644 tests/testdata/empty.compressed.03 create mode 100644 tests/testdata/empty.compressed.04 create mode 100644 tests/testdata/empty.compressed.05 create mode 100644 tests/testdata/empty.compressed.06 create mode 100644 tests/testdata/empty.compressed.07 create mode 100644 tests/testdata/empty.compressed.08 create mode 100644 tests/testdata/empty.compressed.09 create mode 100644 tests/testdata/empty.compressed.10 create mode 100644 tests/testdata/empty.compressed.11 create mode 100644 tests/testdata/empty.compressed.12 create mode 100644 tests/testdata/empty.compressed.13 create mode 100644 tests/testdata/empty.compressed.14 create mode 100644 tests/testdata/empty.compressed.15 create mode 100644 tests/testdata/empty.compressed.16 create mode 100644 tests/testdata/empty.compressed.17 create mode 100644 tests/testdata/empty.compressed.18 create mode 100644 tests/testdata/mapsdatazrh create mode 100644 tests/testdata/mapsdatazrh.compressed create mode 100644 tests/testdata/random_org_10k.bin create mode 100644 tests/testdata/random_org_10k.bin.compressed create mode 100644 tests/testdata/x.compressed.00 create mode 100644 tests/testdata/x.compressed.01 create mode 100644 tests/testdata/x.compressed.02 create mode 100644 tests/testdata/x.compressed.03 (limited to 'tests') diff --git a/tests/compatibility_test.sh b/tests/compatibility_test.sh index cf72662..e907485 100755 --- a/tests/compatibility_test.sh +++ b/tests/compatibility_test.sh @@ -6,34 +6,16 @@ set -o errexit BRO=../tools/bro -INPUTS=""" -testdata/empty.compressed -testdata/x.compressed -testdata/64x.compressed -testdata/10x10y.compressed -testdata/xyzzy.compressed -testdata/quickfox.compressed -testdata/ukkonooa.compressed -testdata/monkey.compressed -testdata/backward65536.compressed -testdata/zeros.compressed -testdata/quickfox_repeated.compressed -testdata/compressed_file.compressed -testdata/compressed_repeated.compressed -testdata/alice29.txt.compressed -testdata/asyoulik.txt.compressed -testdata/lcet10.txt.compressed -testdata/plrabn12.txt.compressed -""" -for file in $INPUTS; do +for file in testdata/*.compressed*; do echo "Testing decompression of file $file" - uncompressed=${file%.compressed}.uncompressed - expected=${file%.compressed} + expected=${file%.compressed*} + uncompressed=${expected}.uncompressed $BRO -f -d -i $file -o $uncompressed diff -q $uncompressed $expected # Test the streaming version cat $file | $BRO -d > $uncompressed diff -q $uncompressed $expected + rm -f $uncompressed done diff --git a/tests/testdata/empty.compressed.00 b/tests/testdata/empty.compressed.00 new file mode 100644 index 0000000..f8fa5a2 --- /dev/null +++ b/tests/testdata/empty.compressed.00 @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/tests/testdata/empty.compressed.01 b/tests/testdata/empty.compressed.01 new file mode 100644 index 0000000..17bb347 --- /dev/null +++ b/tests/testdata/empty.compressed.01 @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/tests/testdata/empty.compressed.02 b/tests/testdata/empty.compressed.02 new file mode 100644 index 0000000..c183df6 --- /dev/null +++ b/tests/testdata/empty.compressed.02 @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/tests/testdata/empty.compressed.03 b/tests/testdata/empty.compressed.03 new file mode 100644 index 0000000..ae60db8 --- /dev/null +++ b/tests/testdata/empty.compressed.03 @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/tests/testdata/empty.compressed.04 b/tests/testdata/empty.compressed.04 new file mode 100644 index 0000000..8fac034 --- /dev/null +++ b/tests/testdata/empty.compressed.04 @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/tests/testdata/empty.compressed.05 b/tests/testdata/empty.compressed.05 new file mode 100644 index 0000000..98c9dcc --- /dev/null +++ b/tests/testdata/empty.compressed.05 @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/tests/testdata/empty.compressed.06 b/tests/testdata/empty.compressed.06 new file mode 100644 index 0000000..84f606f --- /dev/null +++ b/tests/testdata/empty.compressed.06 @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/tests/testdata/empty.compressed.07 b/tests/testdata/empty.compressed.07 new file mode 100644 index 0000000..0941d53 --- /dev/null +++ b/tests/testdata/empty.compressed.07 @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/tests/testdata/empty.compressed.08 b/tests/testdata/empty.compressed.08 new file mode 100644 index 0000000..e440e5c --- /dev/null +++ b/tests/testdata/empty.compressed.08 @@ -0,0 +1 @@ +3 \ No newline at end of file diff --git a/tests/testdata/empty.compressed.09 b/tests/testdata/empty.compressed.09 new file mode 100644 index 0000000..7813681 --- /dev/null +++ b/tests/testdata/empty.compressed.09 @@ -0,0 +1 @@ +5 \ No newline at end of file diff --git a/tests/testdata/empty.compressed.10 b/tests/testdata/empty.compressed.10 new file mode 100644 index 0000000..c793025 --- /dev/null +++ b/tests/testdata/empty.compressed.10 @@ -0,0 +1 @@ +7 \ No newline at end of file diff --git a/tests/testdata/empty.compressed.11 b/tests/testdata/empty.compressed.11 new file mode 100644 index 0000000..f11c82a --- /dev/null +++ b/tests/testdata/empty.compressed.11 @@ -0,0 +1 @@ +9 \ No newline at end of file diff --git a/tests/testdata/empty.compressed.12 b/tests/testdata/empty.compressed.12 new file mode 100644 index 0000000..1c8a0e7 --- /dev/null +++ b/tests/testdata/empty.compressed.12 @@ -0,0 +1 @@ +; \ No newline at end of file diff --git a/tests/testdata/empty.compressed.13 b/tests/testdata/empty.compressed.13 new file mode 100644 index 0000000..851c75c --- /dev/null +++ b/tests/testdata/empty.compressed.13 @@ -0,0 +1 @@ += \ No newline at end of file diff --git a/tests/testdata/empty.compressed.14 b/tests/testdata/empty.compressed.14 new file mode 100644 index 0000000..0d758c9 --- /dev/null +++ b/tests/testdata/empty.compressed.14 @@ -0,0 +1 @@ +? \ No newline at end of file diff --git a/tests/testdata/empty.compressed.15 b/tests/testdata/empty.compressed.15 new file mode 100644 index 0000000..152f9ed --- /dev/null +++ b/tests/testdata/empty.compressed.15 @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/tests/testdata/empty.compressed.16 b/tests/testdata/empty.compressed.16 new file mode 100644 index 0000000..e136a79 Binary files /dev/null and b/tests/testdata/empty.compressed.16 differ diff --git a/tests/testdata/empty.compressed.17 b/tests/testdata/empty.compressed.17 new file mode 100644 index 0000000..81f0388 --- /dev/null +++ b/tests/testdata/empty.compressed.17 @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/tests/testdata/empty.compressed.18 b/tests/testdata/empty.compressed.18 new file mode 100644 index 0000000..524e341 Binary files /dev/null and b/tests/testdata/empty.compressed.18 differ diff --git a/tests/testdata/mapsdatazrh b/tests/testdata/mapsdatazrh new file mode 100644 index 0000000..0371183 Binary files /dev/null and b/tests/testdata/mapsdatazrh differ diff --git a/tests/testdata/mapsdatazrh.compressed b/tests/testdata/mapsdatazrh.compressed new file mode 100644 index 0000000..77bfa47 Binary files /dev/null and b/tests/testdata/mapsdatazrh.compressed differ diff --git a/tests/testdata/random_org_10k.bin b/tests/testdata/random_org_10k.bin new file mode 100644 index 0000000..faf8a3a Binary files /dev/null and b/tests/testdata/random_org_10k.bin differ diff --git a/tests/testdata/random_org_10k.bin.compressed b/tests/testdata/random_org_10k.bin.compressed new file mode 100644 index 0000000..5ffbaa0 Binary files /dev/null and b/tests/testdata/random_org_10k.bin.compressed differ diff --git a/tests/testdata/x.compressed.00 b/tests/testdata/x.compressed.00 new file mode 100644 index 0000000..33e3a98 Binary files /dev/null and b/tests/testdata/x.compressed.00 differ diff --git a/tests/testdata/x.compressed.01 b/tests/testdata/x.compressed.01 new file mode 100644 index 0000000..9c8249b Binary files /dev/null and b/tests/testdata/x.compressed.01 differ diff --git a/tests/testdata/x.compressed.02 b/tests/testdata/x.compressed.02 new file mode 100644 index 0000000..3a5890d Binary files /dev/null and b/tests/testdata/x.compressed.02 differ diff --git a/tests/testdata/x.compressed.03 b/tests/testdata/x.compressed.03 new file mode 100644 index 0000000..842e799 Binary files /dev/null and b/tests/testdata/x.compressed.03 differ -- cgit v1.1