Author: infinoid
Date: Wed Jan  7 08:27:52 2009
New Revision: 35131

Modified:
   trunk/lib/Pod/Simple/HTMLBatch.pm   (props changed)
   trunk/lib/Pod/Simple/HTMLLegacy.pm   (props changed)
   trunk/lib/Pod/Simple/Progress.pm   (props changed)
   trunk/lib/Pod/Simple/Search.pm   (contents, props changed)
   trunk/lib/Pod/Simple/XHTML.pm   (props changed)
   trunk/t/op/annotate.t   (contents, props changed)

Log:
[cage] A batch of file_metadata.t fixes.


Modified: trunk/lib/Pod/Simple/Search.pm
==============================================================================
--- trunk/lib/Pod/Simple/Search.pm      (original)
+++ trunk/lib/Pod/Simple/Search.pm      Wed Jan  7 08:27:52 2009
@@ -401,7 +401,7 @@
             if m{^v?["']?([0-9_]+(\.[0-9_]+)*)["']?$}s
              # like in $VERSION = "3.14159";
              or m{\$Revision:\s*([0-9_]+(?:\.[0-9_]+)*)\s*\$}s
-             # like in sprintf("%d.%02d", q$Revision: 4.13 $ =~ 
/(\d+)\.(\d+)/);
+             # like in sprintf("%d.%02d", q$Revision$ =~ /(\d+)\.(\d+)/);
           ;
            
           # Like in sprintf("%d.%s", map {s/_//g; $_} q$Name: 
release-0_55-public $ =~ /-(\d+)_([\d_]+)/)

Modified: trunk/t/op/annotate.t
==============================================================================
--- trunk/t/op/annotate.t       (original)
+++ trunk/t/op/annotate.t       Wed Jan  7 08:27:52 2009
@@ -22,8 +22,8 @@
     plan(25)
 
     'no_annotations'()
-    'annotations_exception'()

-    'annotations_ops'()

+    'annotations_exception'()
+    'annotations_ops'()
     'backtrace_annotations'()
 .end
 
@@ -72,95 +72,95 @@
     $P1 = $P0["line"]
     is ($P1, 2, "line annotation got OK from hash")
 .end
-

-

-.sub 'annotations_ops'

-    .annotate 'file', 'loo.py'

-    .annotate 'line', 1

-

-    $P1 = annotations 'file'

-    is ($P1, 'loo.py', 'annotations_p_sc op returned correct thing')

-    $S0 = 'line'

-    $P1 = annotations $S0

-    is ($P1, 1,        'annotations_p_s op returned correct thing')

-

-    .annotate 'line', 2

-    $P0 = annotations

-    .annotate 'line', 3

-

-    isa_ok ($P0, 'Hash', 'annotations_p op gives back hash')

-    $I0 = elements $P0

-    is ($I0, 2, 'annoations op gave hash with right number of elements')

-    $S0 = $P0['file']

-    is ($S0, 'loo.py', 'annotations_p op gave back correct hash')

-    $I1 = $P0['line']

-    is ($I1, 2, 'annotations_p op gave back correct hash')

-.end
-

-

-.sub 'backtrace_annotations'

-    push_eh failed

-    'foo'()

-

-  failed:

-    .local pmc exception, bt, frame, ann

-    .get_results (exception)

-    bt = exception.'backtrace'()

-    $I0 = elements bt

-    $I0 = $I0 > 3

-    ok ($I0, 'backtrace has enough elements')

-

-    frame = bt[0]

-    $S0 = frame["sub"]

-    is ($S0, 'baz', 'frame 0 has right sub name')

-    ann = frame["annotations"]

-    $S0 = ann["file"]

-    is ($S0, 'baz.pm', 'frame 0 has right file annotation')

-    $I0 = ann["line"]

-    is ($I0, 2, 'frame 0 has right line annotation')

-

-    frame = bt[1]

-    $S0 = frame["sub"]

-    is ($S0, 'bar', 'frame 1 has right sub name')

-    ann = frame["annotations"]

-    $S0 = ann["file"]

-    is ($S0, 'foo.p6', 'frame 1 has right file annotation')

-    $I0 = ann["line"]

-    is ($I0, 5, 'frame 1 has right line annotation')

-

-    frame = bt[2]

-    $S0 = frame["sub"]

-    is ($S0, 'foo', 'frame 2 has right sub name')

-    ann = frame["annotations"]

-    $S0 = ann["file"]

-    is ($S0, 'foo.p6', 'frame 2 has right file annotation')

-    $I0 = ann["line"]

-    is ($I0, 2, 'frame 2 has right line annotation')

-.end

-

-# Test subs for backtrace_annotations

-.sub 'foo'

-    .annotate 'file', 'foo.p6'

-    .annotate 'line', 1

-    noop

-    .annotate 'line', 2

-    'bar'()

-    .annotate 'line', 3

-.end

-.sub 'bar'

-    .annotate 'line', 4

-    noop

-    .annotate 'line', 5

-    'baz'()

-.end

-.sub 'baz'

-    .annotate 'file', 'baz.pm'

-    .annotate 'line', 1

-    noop

-   .annotate 'line', 2

-   die "LOL HALP I HAZ A FAIL"

-.end

-

+
+
+.sub 'annotations_ops'
+    .annotate 'file', 'loo.py'
+    .annotate 'line', 1
+
+    $P1 = annotations 'file'
+    is ($P1, 'loo.py', 'annotations_p_sc op returned correct thing')
+    $S0 = 'line'
+    $P1 = annotations $S0
+    is ($P1, 1,        'annotations_p_s op returned correct thing')
+
+    .annotate 'line', 2
+    $P0 = annotations
+    .annotate 'line', 3
+
+    isa_ok ($P0, 'Hash', 'annotations_p op gives back hash')
+    $I0 = elements $P0
+    is ($I0, 2, 'annoations op gave hash with right number of elements')
+    $S0 = $P0['file']
+    is ($S0, 'loo.py', 'annotations_p op gave back correct hash')
+    $I1 = $P0['line']
+    is ($I1, 2, 'annotations_p op gave back correct hash')
+.end
+
+
+.sub 'backtrace_annotations'
+    push_eh failed
+    'foo'()
+
+  failed:
+    .local pmc exception, bt, frame, ann
+    .get_results (exception)
+    bt = exception.'backtrace'()
+    $I0 = elements bt
+    $I0 = $I0 > 3
+    ok ($I0, 'backtrace has enough elements')
+
+    frame = bt[0]
+    $S0 = frame["sub"]
+    is ($S0, 'baz', 'frame 0 has right sub name')
+    ann = frame["annotations"]
+    $S0 = ann["file"]
+    is ($S0, 'baz.pm', 'frame 0 has right file annotation')
+    $I0 = ann["line"]
+    is ($I0, 2, 'frame 0 has right line annotation')
+
+    frame = bt[1]
+    $S0 = frame["sub"]
+    is ($S0, 'bar', 'frame 1 has right sub name')
+    ann = frame["annotations"]
+    $S0 = ann["file"]
+    is ($S0, 'foo.p6', 'frame 1 has right file annotation')
+    $I0 = ann["line"]
+    is ($I0, 5, 'frame 1 has right line annotation')
+
+    frame = bt[2]
+    $S0 = frame["sub"]
+    is ($S0, 'foo', 'frame 2 has right sub name')
+    ann = frame["annotations"]
+    $S0 = ann["file"]
+    is ($S0, 'foo.p6', 'frame 2 has right file annotation')
+    $I0 = ann["line"]
+    is ($I0, 2, 'frame 2 has right line annotation')
+.end
+
+# Test subs for backtrace_annotations
+.sub 'foo'
+    .annotate 'file', 'foo.p6'
+    .annotate 'line', 1
+    noop
+    .annotate 'line', 2
+    'bar'()
+    .annotate 'line', 3
+.end
+.sub 'bar'
+    .annotate 'line', 4
+    noop
+    .annotate 'line', 5
+    'baz'()
+.end
+.sub 'baz'
+    .annotate 'file', 'baz.pm'
+    .annotate 'line', 1
+    noop
+   .annotate 'line', 2
+   die "LOL HALP I HAZ A FAIL"
+.end
+
 
 # Local Variables:
 #   mode: pir 

Reply via email to