aboutsummaryrefslogtreecommitdiffstats
path: root/zlib-flate/qtest
diff options
context:
space:
mode:
authorJay Berkenbilt <ejb@ql.org>2008-04-29 14:55:25 +0200
committerJay Berkenbilt <ejb@ql.org>2008-04-29 14:55:25 +0200
commit9a0b88bf7777c153dc46ace22db74ef24d51583a (patch)
treef567ac1cf2bf5071a611eb49323a935b6ac938ff /zlib-flate/qtest
downloadqpdf-9a0b88bf7777c153dc46ace22db74ef24d51583a.tar.zst
update release date to actual daterelease-qpdf-2.0
git-svn-id: svn+q:///qpdf/trunk@599 71b93d88-0707-0410-a8cf-f5a4172ac649
Diffstat (limited to 'zlib-flate/qtest')
-rw-r--r--zlib-flate/qtest/1.compressedbin0 -> 193 bytes
-rw-r--r--zlib-flate/qtest/1.uncompressed5
-rw-r--r--zlib-flate/qtest/zf.test26
3 files changed, 31 insertions, 0 deletions
diff --git a/zlib-flate/qtest/1.compressed b/zlib-flate/qtest/1.compressed
new file mode 100644
index 00000000..3d05ab1c
--- /dev/null
+++ b/zlib-flate/qtest/1.compressed
Binary files differ
diff --git a/zlib-flate/qtest/1.uncompressed b/zlib-flate/qtest/1.uncompressed
new file mode 100644
index 00000000..0446561f
--- /dev/null
+++ b/zlib-flate/qtest/1.uncompressed
@@ -0,0 +1,5 @@
+Once upon a time there lived three qowws. They didn't like poridge
+much, so they had salad for breakfast. Goldilocks, upon breaking and
+entering, found this to be distasteful and so she just went away
+without eating any. This somewhat short-circuited the story. The
+End.
diff --git a/zlib-flate/qtest/zf.test b/zlib-flate/qtest/zf.test
new file mode 100644
index 00000000..39271e16
--- /dev/null
+++ b/zlib-flate/qtest/zf.test
@@ -0,0 +1,26 @@
+#!/usr/bin/env perl
+require 5.008;
+BEGIN { $^W = 1; }
+use strict;
+
+require TestDriver;
+
+my $td = new TestDriver('zlib-flate');
+
+$td->runtest("compress",
+ {$td->COMMAND => "zlib-flate -compress < 1.uncompressed"},
+ {$td->FILE => "1.compressed",
+ $td->EXIT_STATUS => 0});
+
+$td->runtest("uncompress",
+ {$td->COMMAND => "zlib-flate -uncompress < 1.compressed"},
+ {$td->FILE => "1.uncompressed",
+ $td->EXIT_STATUS => 0});
+
+$td->runtest("error",
+ {$td->COMMAND => "zlib-flate -uncompress < 1.uncompressed"},
+ {$td->REGEXP => "flate: inflate: data: .*\n",
+ $td->EXIT_STATUS => 2},
+ $td->NORMALIZE_NEWLINES);
+
+$td->report(3);