summaryrefslogtreecommitdiffstats
path: root/examples/pdf-invert-images.cc
diff options
context:
space:
mode:
Diffstat (limited to 'examples/pdf-invert-images.cc')
-rw-r--r--examples/pdf-invert-images.cc11
1 files changed, 10 insertions, 1 deletions
diff --git a/examples/pdf-invert-images.cc b/examples/pdf-invert-images.cc
index f4a4e4ab..867c89c7 100644
--- a/examples/pdf-invert-images.cc
+++ b/examples/pdf-invert-images.cc
@@ -70,6 +70,15 @@ int main(int argc, char* argv[])
whoami += 3;
}
+ // For test suite
+ bool static_id = false;
+ if ((argc > 1) && (strcmp(argv[1], " --static-id") == 0))
+ {
+ static_id = true;
+ --argc;
+ ++argv;
+ }
+
if (! ((argc == 3) || (argc == 4)))
{
usage();
@@ -149,7 +158,7 @@ int main(int argc, char* argv[])
// Write out a new file
QPDFWriter w(qpdf, outfilename);
- if (QUtil::get_env("IN_TESTSUITE"))
+ if (static_id)
{
// For the test suite, uncompress streams and use static
// IDs.