2022-03-18 01:06:23 +00:00
|
|
|
#!/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
|
|
|
|
|
2023-12-23 15:41:55 +00:00
|
|
|
WANTED_VERSION=$(awk -F'"' '/# *define QPDF_VERSION / {print $2}' include/qpdf/DLL.h | tail -n 1)
|
2022-09-10 13:24:12 +00:00
|
|
|
|
|
|
|
qpdf --version | grep -F $WANTED_VERSION
|
2022-03-18 01:06:23 +00:00
|
|
|
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
|