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