fix test: the TAP actually comes from a subprocess, so the plan is broken
[p5sagit/Sub-Name.git] / t / RT96893_perlcc.t
1 use strict;
2 use warnings;
3
4 use Test::More 0.88;
5
6 plan skip_all => 'B::C required for testing perlcc -O3'
7     unless eval "require B::C;";
8
9 plan skip_all => "B::C is too old (require 1.48, have $B::C::VERSION)"
10     unless eval { B::C->VERSION('1.48') };
11
12 use Devel::CheckBin;
13 plan skip_all => 'perlcc required' unless can_run('perlcc');
14
15 plan tests => 1;
16
17 my $f = "t/rt96893x.pl";
18 open my $fh, ">", $f; END { unlink $f if $f }
19 print $fh 'use Sub::Name; subname("main::bar", sub{42}); print "ok 1\n";';
20 close $fh;
21
22 system($^X, qw(-Mblib -S perlcc -O3 -UCarp -UConfig -r), $f);
23
24 unlink "t/rt96893x", "t/rt96893x.exe";
25 # vim: ft=perl