2
1
mirror of https://github.com/qpdf/qpdf.git synced 2024-09-28 04:59:05 +00:00

Move filter-completion.pl to libtests/arg_parser

This commit is contained in:
Jay Berkenbilt 2021-12-30 12:56:27 -05:00
parent 32f7d9989a
commit 4782b5904f
2 changed files with 6 additions and 2 deletions

View File

@ -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 = ();

View File

@ -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);
}