aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJay Berkenbilt <ejb@ql.org>2021-12-30 18:56:27 +0100
committerJay Berkenbilt <ejb@ql.org>2022-01-06 00:13:25 +0100
commit4782b5904f2cddc7ecda86abc0590a2ff8715b33 (patch)
tree845e42d34511ed8340c6af87188057cbfa0c7035
parent32f7d9989a3c6d45083ff9e686d5eebb87615e42 (diff)
downloadqpdf-4782b5904f2cddc7ecda86abc0590a2ff8715b33.tar.zst
Move filter-completion.pl to libtests/arg_parser
-rw-r--r--libtests/qtest/arg_parser/filter-completion.pl (renamed from qpdf/qtest/qpdf/filter-completion.pl)2
-rw-r--r--qpdf/qtest/qpdf.test6
2 files changed, 6 insertions, 2 deletions
diff --git a/qpdf/qtest/qpdf/filter-completion.pl b/libtests/qtest/arg_parser/filter-completion.pl
index a81178e2..2d176309 100644
--- a/qpdf/qtest/qpdf/filter-completion.pl
+++ b/libtests/qtest/arg_parser/filter-completion.pl
@@ -1,6 +1,8 @@
use warnings;
use strict;
+# THIS SCRIPT IS ALSO USED IN qpdf.test
+
# Output every line from STDIN that appears in the file.
my %wanted = ();
my %notwanted = ();
diff --git a/qpdf/qtest/qpdf.test b/qpdf/qtest/qpdf.test
index cd401216..d12c9492 100644
--- a/qpdf/qtest/qpdf.test
+++ b/qpdf/qtest/qpdf.test
@@ -115,6 +115,8 @@ my @completion_tests = (
['qpdf --encrypt user\ password ', undef, 'quoting'],
);
$n_tests += 2 * scalar(@completion_tests);
+my $completion_filter =
+ "perl ../../../libtests/qtest/arg_parser/filter-completion.pl";
foreach my $c (@completion_tests)
{
my ($cmd, $point, $description) = @$c;
@@ -126,12 +128,12 @@ foreach my $c (@completion_tests)
}
$td->runtest("bash completion: $description",
{$td->COMMAND => [@{bash_completion($cmd, $point)}],
- $td->FILTER => "perl filter-completion.pl $out"},
+ $td->FILTER => "$completion_filter $out"},
{$td->FILE => "$out", $td->EXIT_STATUS => 0},
$td->NORMALIZE_NEWLINES);
$td->runtest("zsh completion: $description",
{$td->COMMAND => [@{zsh_completion($cmd, $point)}],
- $td->FILTER => "perl filter-completion.pl $zout"},
+ $td->FILTER => "$completion_filter $zout"},
{$td->FILE => "$zout", $td->EXIT_STATUS => 0},
$td->NORMALIZE_NEWLINES);
}