Change 34135 by [EMAIL PROTECTED] on 2008/07/12 18:53:26

        Format tests for @* too.

Affected files ...

... //depot/perl/t/op/write.t#51 edit

Differences ...

==== //depot/perl/t/op/write.t#51 (xtext) ====
Index: perl/t/op/write.t
--- perl/t/op/write.t#50~34129~ 2008-07-11 13:04:57.000000000 -0700
+++ perl/t/op/write.t   2008-07-12 11:53:26.000000000 -0700
@@ -61,7 +61,7 @@
 my $bas_tests = 20;
 
 # number of tests in section 3
-my $bug_tests = 4 + 3 * 3 * 3;
+my $bug_tests = 4 + 3 * 3 * 5 * 2;
 
 # number of tests in section 4
 my $hmb_tests = 35;
@@ -517,17 +517,21 @@
 
   foreach my $first ('N', $pound, $pound_utf8) {
     foreach my $base ('N', $pm, $pm_utf8) {
-      foreach my $second ($base, "$base\n", "$base\nMoo!") {
-       my $name = "$first, $second";
-       $name =~ s/\n/\\n/;
-
-       my ($copy1, $copy2) = ($first, $second);
-       $first =~ /(.+)/ or die $first;
-       my $expect = "1${1}2";
-       $second =~ /(.+)/ or die $second;
-       $expect .= " 3${1}4";
+      foreach my $second ($base, "$base\n", "$base\nMoo!", "$base\nMoo!\n",
+                         "$base\nMoo!\n",) {
+       foreach (['^*', qr/(.+)/], ['@*', qr/(.*?)$/s]) {
+         my ($format, $re) = @$_;
+         my $name = "$first, $second $format";
+         $name =~ s/\n/\\n/g;
+
+         my ($copy1, $copy2) = ($first, $second);
+         $first =~ /(.+)/ or die $first;
+         my $expect = "1${1}2";
+         $second =~ $re or die $second;
+         $expect .= " 3${1}4";
 
-       is swrite('1^*2 3^*4', $copy1, $copy2), $expect, $name;
+         is swrite("1^*2 3${format}4", $copy1, $copy2), $expect, $name;
+       }
       }
     }
   }
End of Patch.

Reply via email to