diff options
Diffstat (limited to 'contrib/perl5/t/lib/dprof')
-rw-r--r-- | contrib/perl5/t/lib/dprof/V.pm | 63 | ||||
-rw-r--r-- | contrib/perl5/t/lib/dprof/test1_t | 18 | ||||
-rw-r--r-- | contrib/perl5/t/lib/dprof/test1_v | 24 | ||||
-rw-r--r-- | contrib/perl5/t/lib/dprof/test2_t | 21 | ||||
-rw-r--r-- | contrib/perl5/t/lib/dprof/test2_v | 36 | ||||
-rw-r--r-- | contrib/perl5/t/lib/dprof/test3_t | 19 | ||||
-rw-r--r-- | contrib/perl5/t/lib/dprof/test3_v | 29 | ||||
-rw-r--r-- | contrib/perl5/t/lib/dprof/test4_t | 24 | ||||
-rw-r--r-- | contrib/perl5/t/lib/dprof/test4_v | 36 | ||||
-rw-r--r-- | contrib/perl5/t/lib/dprof/test5_t | 25 | ||||
-rw-r--r-- | contrib/perl5/t/lib/dprof/test5_v | 15 | ||||
-rw-r--r-- | contrib/perl5/t/lib/dprof/test6_t | 29 | ||||
-rw-r--r-- | contrib/perl5/t/lib/dprof/test6_v | 16 |
13 files changed, 0 insertions, 355 deletions
diff --git a/contrib/perl5/t/lib/dprof/V.pm b/contrib/perl5/t/lib/dprof/V.pm deleted file mode 100644 index 152cddc..0000000 --- a/contrib/perl5/t/lib/dprof/V.pm +++ /dev/null @@ -1,63 +0,0 @@ -package V; - -use Getopt::Std 'getopts'; -getopts('vp:d:'); - -require Exporter; -@ISA = 'Exporter'; - -@EXPORT = qw( dprofpp $opt_v $results $expected report @results ); -@EXPORT_OK = qw( notok ok $num ); - -$num = 0; -$results = $expected = ''; -$perl = $opt_p || $^X; -$dpp = $opt_d || '../utils/dprofpp'; -$dpp .= '.com' if $^O eq 'VMS'; - -print "\nperl: $perl\n" if $opt_v; -if( ! -f $perl ){ die "Where's Perl?" } -if( ! -f $dpp ) { - ($dpp = $^X) =~ s@(^.*)[/|\\].*@$1/dprofpp@; - die "Where's dprofpp?" if( ! -f $dpp ); -} - -sub dprofpp { - my $switches = shift; - - open( D, "$perl \"-I../lib\" $dpp \"$switches\" 2> err |" ) || warn "$0: Can't run. $!\n"; - @results = <D>; - close D; - - open( D, "<err" ) || warn "$0: Can't open: $!\n"; - @err = <D>; - close D; - push( @results, @err ) if @err; - - $results = qq{@results}; - # ignore Loader (Dyna/Auto etc), leave newline - $results =~ s/^\w+Loader::import//; - $results =~ s/\n /\n/gm; - $results; -} - -sub report { - $num = shift; - my $sub = shift; - my $x; - - $x = &$sub; - $x ? &ok : ¬ok; -} - -sub ok { - print "ok $num\n"; -} - -sub notok { - print "not ok $num\n"; - print "\nResult\n{$results}\n"; - print "Expected\n{$expected}\n"; -} - -1; diff --git a/contrib/perl5/t/lib/dprof/test1_t b/contrib/perl5/t/lib/dprof/test1_t deleted file mode 100644 index d504cd5..0000000 --- a/contrib/perl5/t/lib/dprof/test1_t +++ /dev/null @@ -1,18 +0,0 @@ -sub foo { - print "in sub foo\n"; - bar(); -} - -sub bar { - print "in sub bar\n"; -} - -sub baz { - print "in sub baz\n"; - bar(); - foo(); -} - -bar(); -baz(); -foo(); diff --git a/contrib/perl5/t/lib/dprof/test1_v b/contrib/perl5/t/lib/dprof/test1_v deleted file mode 100644 index 542a503..0000000 --- a/contrib/perl5/t/lib/dprof/test1_v +++ /dev/null @@ -1,24 +0,0 @@ -# perl - -use V; - -dprofpp( '-T' ); -$expected = -qq{main::bar -main::baz - main::bar - main::foo - main::bar -main::foo - main::bar -}; -report 1, sub { $expected eq $results }; - -dprofpp('-TF'); -report 2, sub { $expected eq $results }; - -dprofpp( '-t' ); -report 3, sub { $expected eq $results }; - -dprofpp('-tF'); -report 4, sub { $expected eq $results }; diff --git a/contrib/perl5/t/lib/dprof/test2_t b/contrib/perl5/t/lib/dprof/test2_t deleted file mode 100644 index edc46c5..0000000 --- a/contrib/perl5/t/lib/dprof/test2_t +++ /dev/null @@ -1,21 +0,0 @@ -sub foo { - print "in sub foo\n"; - bar(); -} - -sub bar { - print "in sub bar\n"; -} - -sub baz { - print "in sub baz\n"; - bar(); - bar(); - bar(); - foo(); -} - -bar(); -bar(); -baz(); -foo(); diff --git a/contrib/perl5/t/lib/dprof/test2_v b/contrib/perl5/t/lib/dprof/test2_v deleted file mode 100644 index 8b775b3..0000000 --- a/contrib/perl5/t/lib/dprof/test2_v +++ /dev/null @@ -1,36 +0,0 @@ -# perl - -use V; - -dprofpp( '-T' ); -$expected = -qq{main::bar -main::bar -main::baz - main::bar - main::bar - main::bar - main::foo - main::bar -main::foo - main::bar -}; -report 5, sub { $expected eq $results }; - -dprofpp('-TF'); -report 6, sub { $expected eq $results }; - -dprofpp( '-t' ); -$expected = -qq{main::bar (2x) -main::baz - main::bar (3x) - main::foo - main::bar -main::foo - main::bar -}; -report 7, sub { $expected eq $results }; - -dprofpp('-tF'); -report 8, sub { $expected eq $results }; diff --git a/contrib/perl5/t/lib/dprof/test3_t b/contrib/perl5/t/lib/dprof/test3_t deleted file mode 100644 index a5327f4..0000000 --- a/contrib/perl5/t/lib/dprof/test3_t +++ /dev/null @@ -1,19 +0,0 @@ -sub foo { - print "in sub foo\n"; - exit(0); - bar(); -} - -sub bar { - print "in sub bar\n"; -} - -sub baz { - print "in sub baz\n"; - bar(); - foo(); -} - -bar(); -baz(); -foo(); diff --git a/contrib/perl5/t/lib/dprof/test3_v b/contrib/perl5/t/lib/dprof/test3_v deleted file mode 100644 index df7543e..0000000 --- a/contrib/perl5/t/lib/dprof/test3_v +++ /dev/null @@ -1,29 +0,0 @@ -# perl - -use V; - -dprofpp( '-T' ); -$e1 = $expected = -qq{main::bar -main::baz - main::bar - main::foo -}; -report 9, sub { $expected eq $results }; - -dprofpp('-TF'); -$e2 = $expected = -qq{main::bar -main::baz - main::bar - main::foo -}; -report 10, sub { $expected eq $results }; - -dprofpp( '-t' ); -$expected = $e1; -report 11, sub { 1 }; - -dprofpp('-tF'); -$expected = $e2; -report 12, sub { $expected eq $results }; diff --git a/contrib/perl5/t/lib/dprof/test4_t b/contrib/perl5/t/lib/dprof/test4_t deleted file mode 100644 index 7299682..0000000 --- a/contrib/perl5/t/lib/dprof/test4_t +++ /dev/null @@ -1,24 +0,0 @@ -sub foo { - print "in sub foo\n"; - bar(); -} - -sub bar { - print "in sub bar\n"; -} - -sub baz { - print "in sub baz\n"; - bar(); - bar(); - bar(); - foo(); -} - -bar(); - -eval { fork }; - -bar(); -baz(); -foo(); diff --git a/contrib/perl5/t/lib/dprof/test4_v b/contrib/perl5/t/lib/dprof/test4_v deleted file mode 100644 index d9677ff..0000000 --- a/contrib/perl5/t/lib/dprof/test4_v +++ /dev/null @@ -1,36 +0,0 @@ -# perl - -use V; - -dprofpp( '-T' ); -$expected = -qq{main::bar -main::bar -main::baz - main::bar - main::bar - main::bar - main::foo - main::bar -main::foo - main::bar -}; -report 13, sub { $expected eq $results }; - -dprofpp('-TF'); -report 14, sub { $expected eq $results }; - -dprofpp( '-t' ); -$expected = -qq{main::bar (2x) -main::baz - main::bar (3x) - main::foo - main::bar -main::foo - main::bar -}; -report 15, sub { $expected eq $results }; - -dprofpp('-tF'); -report 16, sub { $expected eq $results }; diff --git a/contrib/perl5/t/lib/dprof/test5_t b/contrib/perl5/t/lib/dprof/test5_t deleted file mode 100644 index 0b11137..0000000 --- a/contrib/perl5/t/lib/dprof/test5_t +++ /dev/null @@ -1,25 +0,0 @@ -# Test that dprof doesn't break -# &bar; used as &bar(@_); - -sub foo1 { - print "in foo1(@_)\n"; - bar(@_); -} -sub foo2 { - print "in foo2(@_)\n"; - &bar; -} -sub bar { - print "in bar(@_)\n"; - if( @_ > 0 ){ - &yeppers; - } -} -sub yeppers { - print "rest easy\n"; -} - - -&foo1( A ); -&foo2( B ); - diff --git a/contrib/perl5/t/lib/dprof/test5_v b/contrib/perl5/t/lib/dprof/test5_v deleted file mode 100644 index 9e9298c..0000000 --- a/contrib/perl5/t/lib/dprof/test5_v +++ /dev/null @@ -1,15 +0,0 @@ -# perl - -use V; - -dprofpp( '-T' ); -$expected = -qq{main::foo1 - main::bar - main::yeppers -main::foo2 - main::bar - main::yeppers -}; -report 17, sub { $expected eq $results }; - diff --git a/contrib/perl5/t/lib/dprof/test6_t b/contrib/perl5/t/lib/dprof/test6_t deleted file mode 100644 index 7b8bf4a..0000000 --- a/contrib/perl5/t/lib/dprof/test6_t +++ /dev/null @@ -1,29 +0,0 @@ -sub foo { - my $x; - my $y; - print "in sub foo\n"; - for( $x = 1; $x < 100; ++$x ){ - bar(); - for( $y = 1; $y < 100; ++$y ){ - } - } -} - -sub bar { - my $x; - print "in sub bar\n"; - for( $x = 1; $x < 100; ++$x ){ - } - die "bar exiting"; -} - -sub baz { - print "in sub baz\n"; - eval { bar(); }; - eval { foo(); }; -} - -eval { bar(); }; -baz(); -eval { foo(); }; - diff --git a/contrib/perl5/t/lib/dprof/test6_v b/contrib/perl5/t/lib/dprof/test6_v deleted file mode 100644 index 2f651ea..0000000 --- a/contrib/perl5/t/lib/dprof/test6_v +++ /dev/null @@ -1,16 +0,0 @@ -# perl - -use V; - -dprofpp( '-T' ); -$expected = -qq{main::bar -main::baz - main::bar - main::foo - main::bar -main::foo - main::bar -}; -report 18, sub { $expected eq $results }; - |