Commit a734af681b62a8fc49d51c1a78f28ace1e35a513

Authored by Jay Berkenbilt
Committed by Jay Berkenbilt
1 parent 6941923c

Run qpdf from path rather than environment variable in tests

With cmake, we are customizing the path for each test suite so we can
ensure we get the right qpdf without having to use an environment
variable.
examples/qtest/c-objects.test
@@ -11,8 +11,6 @@ cleanup(); @@ -11,8 +11,6 @@ cleanup();
11 11
12 my $td = new TestDriver('c-objects'); 12 my $td = new TestDriver('c-objects');
13 13
14 -my $qpdf = $ENV{'QPDF_BIN'} or die;  
15 -  
16 foreach my $i (qw(1 2)) 14 foreach my $i (qw(1 2))
17 { 15 {
18 $td->runtest("c-objects ($i)", 16 $td->runtest("c-objects ($i)",
examples/qtest/linearize.test
@@ -11,15 +11,13 @@ cleanup(); @@ -11,15 +11,13 @@ cleanup();
11 11
12 my $td = new TestDriver('linearize'); 12 my $td = new TestDriver('linearize');
13 13
14 -my $qpdf = $ENV{'QPDF_BIN'} or die;  
15 -  
16 $td->runtest("linearize", 14 $td->runtest("linearize",
17 {$td->COMMAND => "pdf-linearize input.pdf '' a.pdf"}, 15 {$td->COMMAND => "pdf-linearize input.pdf '' a.pdf"},
18 {$td->REGEXP => '(?s).*input\.pdf progress: \d+\%.*', 16 {$td->REGEXP => '(?s).*input\.pdf progress: \d+\%.*',
19 $td->EXIT_STATUS => 0}); 17 $td->EXIT_STATUS => 0});
20 18
21 $td->runtest("check", 19 $td->runtest("check",
22 - {$td->COMMAND => "$qpdf --check a.pdf"}, 20 + {$td->COMMAND => "qpdf --check a.pdf"},
23 {$td->FILE => "check.out", $td->EXIT_STATUS => 0}, 21 {$td->FILE => "check.out", $td->EXIT_STATUS => 0},
24 $td->NORMALIZE_NEWLINES); 22 $td->NORMALIZE_NEWLINES);
25 23
examples/qtest/mod-info.test
@@ -11,7 +11,6 @@ require TestDriver; @@ -11,7 +11,6 @@ require TestDriver;
11 my $td = new TestDriver('pdf-mod-info'); 11 my $td = new TestDriver('pdf-mod-info');
12 12
13 my $prg = "pdf-mod-info"; 13 my $prg = "pdf-mod-info";
14 -my $qpdf = $ENV{'QPDF_BIN'} or die;  
15 14
16 cleanup(); 15 cleanup();
17 16
@@ -93,7 +92,7 @@ sub run_and_cmp @@ -93,7 +92,7 @@ sub run_and_cmp
93 {$td->STRING => $out, 92 {$td->STRING => $out,
94 $td->EXIT_STATUS => 0}); 93 $td->EXIT_STATUS => 0});
95 $td->runtest("$dsc output", 94 $td->runtest("$dsc output",
96 - {$td->COMMAND => "$qpdf --static-id" . 95 + {$td->COMMAND => "qpdf --static-id" .
97 " --no-original-object-ids -qdf $fout -"}, 96 " --no-original-object-ids -qdf $fout -"},
98 {$td->FILE => $fexp, 97 {$td->FILE => $fexp,
99 $td->EXIT_STATUS => 0}); 98 $td->EXIT_STATUS => 0});