diff options
author | Nicholas Clark <nick@ccl4.org> | 2008-07-11 20:04:57 +0000 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2008-07-11 20:04:57 +0000 |
commit | f3f2f1a3479714dd7c55621da87bce4872a4ab17 (patch) | |
tree | 50e6a6d69e55d05eaaf8f7f5aba0c2ed60327d25 /t | |
parent | 4612962a4858c44dd33e3b80c5cbd3f836ae0808 (diff) | |
download | perl-f3f2f1a3479714dd7c55621da87bce4872a4ab17.tar.gz |
Regression tests for, and fix quite a lot of bugs in, cases FF_LINESNGL
and FF_LINEGLOB in pp_formline. (While investigating RT #55668)
Sometimes I wonder if this is actually fun.
p4raw-id: //depot/perl@34129
Diffstat (limited to 't')
-rwxr-xr-x | t/op/write.t | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/t/op/write.t b/t/op/write.t index 853b129ecf..89b5beb7a7 100755 --- a/t/op/write.t +++ b/t/op/write.t @@ -61,7 +61,7 @@ for my $tref ( @NumTests ){ my $bas_tests = 20; # number of tests in section 3 -my $bug_tests = 4; +my $bug_tests = 4 + 3 * 3 * 3; # number of tests in section 4 my $hmb_tests = 35; @@ -511,6 +511,27 @@ for my $tref ( @NumTests ){ like $@, qr/Undefined format/, 'no such format'; } +{ + my ($pound_utf8, $pm_utf8) = map { my $a = "$_\x{100}"; chop $a; $a} + my ($pound, $pm) = ("\xA3", "\xB1"); + + 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"; + + is swrite('1^*2 3^*4', $copy1, $copy2), $expect, $name; + } + } + } +} format EMPTY = . |