Commit | Line | Data |
24f50a79 |
1 | use strict; |
2 | use warnings; |
3 | |
2b637511 |
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 => "testing too old B-C-$B::C::VERSION" |
10 | unless eval { B::C->VERSION('1.48') }; |
24f50a79 |
11 | |
12 | my $f = "t/rt96893x.pl"; |
3aaa8d18 |
13 | open my $fh, ">", $f; END { unlink $f if $f } |
24f50a79 |
14 | print $fh 'use Sub::Name; subname("main::bar", sub{42}); print "ok 1\n";'; |
15 | close $fh; |
16 | |
17 | system($^X, qw(-Mblib -S perlcc -O3 -UCarp -UConfig -r), $f); |
18 | |
19 | unlink "t/rt96893x", "t/rt96893x.exe"; |
2b637511 |
20 | |
21 | done_testing; |
24f50a79 |
22 | # vim: ft=perl |