aboutsummaryrefslogtreecommitdiffstats
path: root/examples/qtest
diff options
context:
space:
mode:
authorm-holger <m-holger@kubitscheck.org>2022-02-07 14:07:09 +0100
committerJay Berkenbilt <jberkenbilt@users.noreply.github.com>2022-02-07 18:49:24 +0100
commit3e98fe46a24d8231ed5f962f5b874032e4994f08 (patch)
tree724d540b2c7f1b0d5dcdb184b6a7dd01f3b2f319 /examples/qtest
parent4fd619818c30fb55b144675d3e5d2c83728e6976 (diff)
downloadqpdf-3e98fe46a24d8231ed5f962f5b874032e4994f08.tar.zst
Tidy example CLI usage
Change "-" to "--" for named parameters. Remove spaces inside "[ option ]" for optional parameters. Fix "pdf-mod-info --dump file" to match usage message.
Diffstat (limited to 'examples/qtest')
-rw-r--r--examples/qtest/bookmarks.test6
-rw-r--r--examples/qtest/bookmarks/test.--show-open.--lines.out (renamed from examples/qtest/bookmarks/test.-show-open.-lines.out)0
-rw-r--r--examples/qtest/bookmarks/test.--show-open.--numbers.out (renamed from examples/qtest/bookmarks/test.-show-open.-numbers.out)0
-rw-r--r--examples/qtest/bookmarks/test.--show-open.x.out (renamed from examples/qtest/bookmarks/test.-show-open.x.out)0
-rw-r--r--examples/qtest/bookmarks/test.x.--lines.out (renamed from examples/qtest/bookmarks/test.x.-lines.out)0
-rw-r--r--examples/qtest/bookmarks/test.x.--numbers.out (renamed from examples/qtest/bookmarks/test.x.-numbers.out)0
-rw-r--r--examples/qtest/mod-info.test28
-rw-r--r--examples/qtest/mod-info/usage.out2
8 files changed, 18 insertions, 18 deletions
diff --git a/examples/qtest/bookmarks.test b/examples/qtest/bookmarks.test
index 395357e3..cff8fc60 100644
--- a/examples/qtest/bookmarks.test
+++ b/examples/qtest/bookmarks.test
@@ -9,9 +9,9 @@ require TestDriver;
my $td = new TestDriver('pdf-bookmarks');
-foreach my $show ("", " -show-open")
+foreach my $show ("", " --show-open")
{
- foreach my $style ("", " -lines", " -numbers")
+ foreach my $style ("", " --lines", " --numbers")
{
my $xshow = $show ? $show : "x";
my $xstyle = $style ? $style : "x";
@@ -37,7 +37,7 @@ $td->runtest("bad",
$td->NORMALIZE_NEWLINES);
$td->runtest("encrypted, targets",
- {$td->COMMAND => "pdf-bookmarks -show-targets 4.pdf user"},
+ {$td->COMMAND => "pdf-bookmarks --show-targets 4.pdf user"},
{$td->FILE => "encrypted.out",
$td->EXIT_STATUS => 0},
$td->NORMALIZE_NEWLINES);
diff --git a/examples/qtest/bookmarks/test.-show-open.-lines.out b/examples/qtest/bookmarks/test.--show-open.--lines.out
index ea66669c..ea66669c 100644
--- a/examples/qtest/bookmarks/test.-show-open.-lines.out
+++ b/examples/qtest/bookmarks/test.--show-open.--lines.out
diff --git a/examples/qtest/bookmarks/test.-show-open.-numbers.out b/examples/qtest/bookmarks/test.--show-open.--numbers.out
index 3680c2d4..3680c2d4 100644
--- a/examples/qtest/bookmarks/test.-show-open.-numbers.out
+++ b/examples/qtest/bookmarks/test.--show-open.--numbers.out
diff --git a/examples/qtest/bookmarks/test.-show-open.x.out b/examples/qtest/bookmarks/test.--show-open.x.out
index 46667ef7..46667ef7 100644
--- a/examples/qtest/bookmarks/test.-show-open.x.out
+++ b/examples/qtest/bookmarks/test.--show-open.x.out
diff --git a/examples/qtest/bookmarks/test.x.-lines.out b/examples/qtest/bookmarks/test.x.--lines.out
index a6de7db5..a6de7db5 100644
--- a/examples/qtest/bookmarks/test.x.-lines.out
+++ b/examples/qtest/bookmarks/test.x.--lines.out
diff --git a/examples/qtest/bookmarks/test.x.-numbers.out b/examples/qtest/bookmarks/test.x.--numbers.out
index 7ff9e2aa..7ff9e2aa 100644
--- a/examples/qtest/bookmarks/test.x.-numbers.out
+++ b/examples/qtest/bookmarks/test.x.--numbers.out
diff --git a/examples/qtest/mod-info.test b/examples/qtest/mod-info.test
index 145bf133..5f927170 100644
--- a/examples/qtest/mod-info.test
+++ b/examples/qtest/mod-info.test
@@ -16,64 +16,64 @@ my $qpdf = $ENV{'QPDF_BIN'} or die;
cleanup();
$td->runtest("usage #1",
- {$td->COMMAND => "$prg -in target.pdf"},
+ {$td->COMMAND => "$prg --in target.pdf"},
{$td->FILE => "usage.out",
$td->EXIT_STATUS => 2},
$td->NORMALIZE_NEWLINES);
$td->runtest("usage #2",
- {$td->COMMAND => "$prg -key abc -val def"},
+ {$td->COMMAND => "$prg --key abc --val def"},
{$td->FILE => "usage.out",
$td->EXIT_STATUS => 2},
$td->NORMALIZE_NEWLINES);
$td->runtest("usage #3",
- {$td->COMMAND => "$prg -key abc -val def abc"},
+ {$td->COMMAND => "$prg --key abc --val def abc"},
{$td->FILE => "usage.out",
$td->EXIT_STATUS => 2},
$td->NORMALIZE_NEWLINES);
$td->runtest("usage #4",
- {$td->COMMAND => "$prg -in source1.pdf -key date -val 01/01/01 -val 12/12/12"},
+ {$td->COMMAND => "$prg --in source1.pdf --key date --val 01/01/01 --val 12/12/12"},
{$td->FILE => "usage.out",
$td->EXIT_STATUS => 2},
$td->NORMALIZE_NEWLINES);
$td->runtest("dump #1",
- {$td->COMMAND => "$prg --dump -in files/source1.pdf"},
+ {$td->COMMAND => "$prg --dump files/source1.pdf"},
{$td->FILE => "dump.out",
$td->EXIT_STATUS => 0},
$td->NORMALIZE_NEWLINES);
$td->runtest("dump #2",
- {$td->COMMAND => "$prg --dump -in files/no-info.pdf"},
+ {$td->COMMAND => "$prg --dump files/no-info.pdf"},
{$td->STRING => "",
$td->EXIT_STATUS => 0},
$td->NORMALIZE_NEWLINES);
$td->runtest("dump #3",
- {$td->COMMAND => "$prg --dump -in files/empty-info.pdf"},
+ {$td->COMMAND => "$prg --dump files/empty-info.pdf"},
{$td->STRING => "",
$td->EXIT_STATUS => 0});
run_and_cmp("modify Subject",
- "$prg -in files/source1.pdf -out out.pdf -key Subject " .
- "-val \"Export Business\"",
+ "$prg --in files/source1.pdf --out out.pdf --key Subject " .
+ "--val \"Export Business\"",
"", "out.pdf", "files/1.qdf");
run_and_cmp("add Subject, remove Producer, modify CreationDate",
- "$prg -in files/source2.pdf -out out.pdf -key Subject " .
- "-val \"Tammlin\" -key Producer -key CreationDate -val 12/12",
+ "$prg --in files/source2.pdf --out out.pdf --key Subject " .
+ "--val \"Tammlin\" --key Producer --key CreationDate --val 12/12",
"", "out.pdf", "files/2.qdf");
run_and_cmp("add Subject (empty-info file)",
- "$prg -in files/empty-info.pdf -out out.pdf -key Subject " .
- "-val Tammlin",
+ "$prg --in files/empty-info.pdf --out out.pdf --key Subject " .
+ "--val Tammlin",
"", "out.pdf", "files/3.qdf");
copy("files/no-info.pdf", "no-info.pdf") or die "can't copy no-info: $!";
run_and_cmp("in-place Producer added (no-info file)",
- "$prg -in no-info.pdf -key Producer -val \"Obivan Kinobi\"",
+ "$prg --in no-info.pdf --key Producer --val \"Obivan Kinobi\"",
"", "no-info.pdf", "files/4.qdf");
cleanup();
diff --git a/examples/qtest/mod-info/usage.out b/examples/qtest/mod-info/usage.out
index 5eeba82e..13ac3b20 100644
--- a/examples/qtest/mod-info/usage.out
+++ b/examples/qtest/mod-info/usage.out
@@ -1,4 +1,4 @@
-Usage: pdf-mod-info -in in_file [-out out_file] [-key key [-val val]?]+
+Usage: pdf-mod-info --in in_file [--out out_file] [--key key [--val val]?]+
Modifies/Adds/Removes PDF /Info entries in the in_file
and stores the result in out_file
Special mode: pdf-mod-info --dump file