line_debug.t: Add diagnostics
authorFather Chrysostomos <sprout@cpan.org>
Sun, 1 Sep 2013 20:33:49 +0000 (13:33 -0700)
committerFather Chrysostomos <sprout@cpan.org>
Sun, 1 Sep 2013 20:34:28 +0000 (13:34 -0700)
t/comp/line_debug.t

index 175c71a..8361194 100644 (file)
@@ -6,6 +6,7 @@ sub ok {
     my($test,$ok) = @_;
     print "not " unless $ok;
     print "ok $test\n";
+    $ok;
 }
 
 # The auxiliary file contains a bunch of code that systematically exercises
@@ -25,7 +26,10 @@ ok 1, scalar(@{"_<comp/line_debug_0.aux"}) == 1+$nlines;
 ok 2, !defined(${"_<comp/line_debug_0.aux"}[0]);
 
 for(1..$nlines) {
-       ok 2+$_, ${"_<comp/line_debug_0.aux"}[$_] eq $lines[$_-1];
+    if (!ok 2+$_, ${"_<comp/line_debug_0.aux"}[$_] eq $lines[$_-1]) {
+       print "# Got: ", ${"_<comp/line_debug_0.aux"}[$_]//"undef\n";
+       print "# Expected: $lines[$_-1]";
+    }
 }
 
 1;