Author: tim.bunce
Date: Tue Jun  9 14:34:43 2009
New Revision: 765

Added:
    trunk/t/test23-strevall.p
    trunk/t/test23-strevall.rdt
    trunk/t/test23-strevall.t
Modified:
    trunk/MANIFEST

Log:
Added test for "(eval N)" style filenames, i.e., missing the invoking  
filename.


Modified: trunk/MANIFEST
==============================================================================
--- trunk/MANIFEST      (original)
+++ trunk/MANIFEST      Tue Jun  9 14:34:43 2009
@@ -115,6 +115,9 @@
  t/test22-strevala.p
  t/test22-strevala.rdt
  t/test22-strevala.t
+t/test23-strevall.p
+t/test23-strevall.t
+t/test23-strevall.rdt
  t/test30-fork-0.p
  t/test30-fork-0.rdt
  t/test30-fork-0.t

Added: trunk/t/test23-strevall.p
==============================================================================
--- (empty file)
+++ trunk/t/test23-strevall.p   Tue Jun  9 14:34:43 2009
@@ -0,0 +1,12 @@
+# test handling of string eval 'file names' that don't include the
+# invoking filename (normally added when $^P & 0x100 is true).
+
+1;
+
+# fake an eval (using a #line directive) that doesn't match the
+# usual "(eval N)[file:line]" syntax:
+#line 42 "(eval 142)"
+# [stats for the line below won't appear in reports because as far as perl  
is
+# concerned the rest of this file isn't actually part of this file, but is
+# actually part of a file called "(eval 142)"]
+242;

Added: trunk/t/test23-strevall.rdt
==============================================================================
--- (empty file)
+++ trunk/t/test23-strevall.rdt Tue Jun  9 14:34:43 2009
@@ -0,0 +1,33 @@
+attribute      application     test23-strevall.p
+attribute      basetime        0
+attribute      clock_id        0
+attribute      nv_size 0
+attribute      perl_version    0
+attribute      profiler_duration       0
+attribute      profiler_end_time       0
+attribute      profiler_start_time     0
+attribute      ticks_per_sec   0
+attribute      total_stmts_discounted  0
+attribute      total_stmts_duration    0
+attribute      total_stmts_measured    0
+attribute      total_sub_calls 0
+attribute      xs_version      0
+fid_block_time 1       4       [ 0 1 ]
+fid_block_time 3       1       0       0
+fid_block_time 3       1       1       0
+fid_block_time 3       1       2       45      [ 0 1 ]
+fid_fileinfo   1       [ test23-strevall.p   1 2 0 0 ]
+fid_fileinfo   2       [ (eval 0) 3 1 2 2 0 0 ]
+fid_fileinfo   3       [ /unknown-eval-invoker   3 130 0 0 ]
+fid_fileinfo   3       eval    1       [ 1 0 ]
+fid_line_time  1       4       [ 0 1 ]
+fid_line_time  3       1       0       0
+fid_line_time  3       1       1       0
+fid_line_time  3       1       2       45      [ 0 1 ]
+fid_sub_time   1       4       [ 0 1 ]
+fid_sub_time   3       1       0       0
+fid_sub_time   3       1       1       0
+fid_sub_time   3       1       2       45      [ 0 1 ]
+profile_modes  fid_block_time  block
+profile_modes  fid_line_time   line
+profile_modes  fid_sub_time    sub

Added: trunk/t/test23-strevall.t
==============================================================================
--- (empty file)
+++ trunk/t/test23-strevall.t   Tue Jun  9 14:34:43 2009
@@ -0,0 +1,6 @@
+use strict;
+use Test::More;
+use lib qw(t/lib);
+use NYTProfTest;
+
+run_test_group;

--~--~---------~--~----~------------~-------~--~----~
You've received this message because you are subscribed to
the Devel::NYTProf Development User group.

Group hosted at:  http://groups.google.com/group/develnytprof-dev
Project hosted at:  http://perl-devel-nytprof.googlecode.com
CPAN distribution:  http://search.cpan.org/dist/Devel-NYTProf

To post, email:  [email protected]
To unsubscribe, email:  [email protected]
-~----------~----~----~----~------~----~------~--~---

Reply via email to