| 1 | use strictscip-perl cpan Devel-NYTProf 6.15 strict/; |
| 2 | use warningsscip-perl cpan Devel-NYTProf 6.15 warnings/; |
| 3 | # Tests implicit calling of utf8::SWASHNEW from unicode regex. |
| 4 | # |
| 5 | # Actually a stress test of all sorts of nasty cases including opcodes calling |
| 6 | # back to perl and stack switching (PUSHSTACKi(PERLSI_MAGIC)). |
| 7 | |
| 8 | use Test::Morescip-perl cpan Devel-NYTProf 6.15 Test/More/; |
| 9 | |
| 10 | use libscip-perl cpan Devel-NYTProf 6.15 lib/ qw(t/lib); |
| 11 | use NYTProfTestscip-perl cpan Devel-NYTProf 6.15 NYTProfTest/; |
| 12 | |
| 13 | use Devel::NYTProf::Runscip-perl cpan Devel-NYTProf 6.15 Devel/NYTProf/Run/ qw(profile_this); |
| 14 | |
| 15 | my $src_code = joinscip-perl cpan Devel-NYTProf 6.15 main/join().("", <DATA>); |
| 16 | |
| 17 | run_test_groupscip-perl cpan Devel-NYTProf 6.15 main/run_test_group().( { |
| 18 | extra_options => { |
| 19 | start => 'begin', |
| 20 | compress => 1, |
| 21 | }, |
| 22 | extra_test_count => 2, |
| 23 | extra_test_code => sub { |
| 24 | my ($profile, $env) = @_scip-perl cpan Devel-NYTProf 6.15 main/`@_`.; |
| 25 | |
| 26 | $profile = profile_thisscip-perl cpan Devel-NYTProf 6.15 Devel/NYTProf/Run/profile_this().( |
| 27 | src_code => $src_code, |
| 28 | out_file => $env->{file}, |
| 29 | skip_sitecustomize => 1, |
| 30 | ); |
| 31 | isa_okscip-perl cpan Devel-NYTProf 6.15 main/isa_ok(). $profile, 'Devel::NYTProf::Data'; |
| 32 | # check if data truncated due to assertion failure |
| 33 | okscip-perl cpan Devel-NYTProf 6.15 main/ok(). $profile->{attribute}{complete}; |
| 34 | }, |
| 35 | }); |
| 36 | |
| 37 | # crashes with perl 5.11.1+ |
| 38 | __DATA__ |
| 39 | $_ = "N\x{100}"; |
| 40 | chop $_; |
| 41 | s/ |
| 42 | (?: [A-Z] | [\d] )+ |
| 43 | (?= [\s] ) |
| 44 | //x; |