aboutsummaryrefslogtreecommitdiffstats
path: root/pkg-test/test-cli
diff options
context:
space:
mode:
Diffstat (limited to 'pkg-test/test-cli')
-rwxr-xr-xpkg-test/test-cli18
1 files changed, 18 insertions, 0 deletions
diff --git a/pkg-test/test-cli b/pkg-test/test-cli
new file mode 100755
index 00000000..6b1c1d88
--- /dev/null
+++ b/pkg-test/test-cli
@@ -0,0 +1,18 @@
+#!/bin/sh
+#
+# Test that the installed qpdf CLI works. Requires the CLI and runtime
+# libraries.
+#
+set -ex
+
+TMP=$1
+if [ ! -d "$TMP" ]; then
+ echo 1>&2 "Usage: $0 tmp-dir"
+ exit 2
+fi
+
+qpdf --version
+qpdf --help
+qpdf --check qpdf/qtest/qpdf/minimal.pdf
+qpdf qpdf/qtest/qpdf/minimal.pdf --encrypt u o 256 -- $TMP/out.pdf
+qpdf --check --password=u $TMP/out.pdf