Skip to content

Commit 807b08e

Browse files
author
Chris White
committed
Update tests for the packed version
1 parent 74ff29a commit 807b08e

File tree

2 files changed

+13
-9
lines changed

2 files changed

+13
-9
lines changed

Makefile.PL

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ testhere: # Run the tests from lib rather than blib
2121
\tperl -Ilib -e 'use Test::Harness "runtests"; runtests \@ARGV;' -- t/*.t
2222
2323
testpacked: pack # Test the packed version
24-
\texport PERLPP_NOUSE=1 PERLPP_CMD="\\\"$secure_perl_path\\\" blib/perlpp"; \\
24+
\texport PERLPP_NOUSE=1 PERLPP_PERLOPTS="blib/perlpp"; \\
2525
\tperl -e 'use Test::Harness "runtests"; runtests \@ARGV;' -- t/*.t
2626
EOT
2727
} #postamble

t/01-capture.t

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,20 @@
22
# Some basic tests for perlpp
33
use rlib './lib';
44
use PerlPPTest;
5-
plan tests => 1;
65

7-
my ($stdout, $stderr, @result);
8-
($stdout, $stderr, @result) = capture {
9-
local *STDIN;
10-
close STDIN;
11-
Text::PerlPP->new->Main(['-e','say 42;']);
12-
};
6+
if($ENV{PERLPP_NOUSE} || 0) {
7+
plan skip_all => 'Loading not tested in this configuration (PERLPP_NOUSE)';
138

14-
is($stdout, "42\n");
9+
} else {
10+
plan tests => 1;
11+
my ($stdout, $stderr, @result) = capture {
12+
local *STDIN;
13+
close STDIN;
14+
Text::PerlPP->new->Main(['-e','say 42;']);
15+
};
16+
17+
is($stdout, "42\n");
18+
}
1519

1620
done_testing();
1721
# vi: set ts=4 sts=4 sw=4 et ai: #

0 commit comments

Comments
 (0)