CPAN Upload: S/SB/SBURKE/Test-1.21.tar.gz
[p5sagit/p5-mst-13.2.git] / lib / Test / t / fail.t
index ce37464..9051a1f 100644 (file)
@@ -51,8 +51,17 @@ shift @got;
 $Expect =~ s/\n+$//;
 my @expect = split /\n\n/, $Expect;
 
+
+sub commentless {
+  my $in = $_[0];
+  $in =~ s/^#[^\n]*\n//mg;
+  $in =~ s/\n#[^\n]*$//mg;
+  return $in;
+}
+
+
 for (my $x=0; $x < @got; $x++) {
-    ok $got[$x], $expect[$x]."\n";
+    ok commentless($got[$x]), commentless($expect[$x]."\n");
 }