summaryrefslogtreecommitdiff
path: root/examples/qtest/npages.test
diff options
context:
space:
mode:
Diffstat (limited to 'examples/qtest/npages.test')
-rw-r--r--examples/qtest/npages.test23
1 files changed, 23 insertions, 0 deletions
diff --git a/examples/qtest/npages.test b/examples/qtest/npages.test
new file mode 100644
index 0000000..b20f254
--- /dev/null
+++ b/examples/qtest/npages.test
@@ -0,0 +1,23 @@
+#!/usr/bin/env perl
+require 5.008;
+BEGIN { $^W = 1; }
+use strict;
+
+chdir("npages");
+
+require TestDriver;
+
+my $td = new TestDriver('pdf-npages');
+
+$td->runtest("normal",
+ {$td->COMMAND => "pdf-npages minimal.pdf"},
+ {$td->STRING => "1\n", $td->EXIT_STATUS => 0},
+ $td->NORMALIZE_NEWLINES);
+
+$td->runtest("error",
+ {$td->COMMAND => "pdf-npages bad"},
+ {$td->STRING => "pdf-npages: bad: not a PDF file\n",
+ $td->EXIT_STATUS => 2},
+ $td->NORMALIZE_NEWLINES);
+
+$td->report(2);