From 531383e69c1fff07d5f3367824e98c0267dd9875 Mon Sep 17 00:00:00 2001 From: Karl Williamson Date: Thu, 12 Mar 2015 23:03:17 -0600 Subject: [PATCH] dist/Data-Dumper/t/dumper.t: Simplify EBCDIC This collapses two pieces of code into one. It isn't necessary to have an ASCII version vs an EBCDIC version. --- dist/Data-Dumper/t/dumper.t | 27 ++++++--------------------- 1 file changed, 6 insertions(+), 21 deletions(-) diff --git a/dist/Data-Dumper/t/dumper.t b/dist/Data-Dumper/t/dumper.t index 14f92dd..78ff7ec 100644 --- a/dist/Data-Dumper/t/dumper.t +++ b/dist/Data-Dumper/t/dumper.t @@ -1413,40 +1413,25 @@ EOT } } -#XXX} { - if ($Is_ebcdic) { - $b = "Bad. XS didn't escape dollar sign"; -############# 322 - $WANT = <<"EOT"; # Careful. This is '' string written inside "" here doc -#\$VAR1 = '\$b\"\@\\\\\xB1'; -EOT - $a = "\$b\"\@\\\xB1\x{100}"; - chop $a; - TEST q(Data::Dumper->Dump([$a])), "utf8 flag with \" and \$"; - if ($XS) { - $WANT = <<'EOT'; # While this is "" string written inside "" here doc -#$VAR1 = "\$b\"\@\\\x{b1}"; -EOT - TEST q(Data::Dumper->Dumpxs([$a])), "XS utf8 flag with \" and \$"; - } - } else { $b = "Bad. XS didn't escape dollar sign"; ############# + # B6 is chosen because it is UTF-8 variant on ASCII and all 3 EBCDIC + # platforms that Perl currently purports to work on. It also is the only + # such code point that has the same meaning on all 4, the paragraph sign. $WANT = <<"EOT"; # Careful. This is '' string written inside "" here doc -#\$VAR1 = '\$b\"\@\\\\\xA3'; +#\$VAR1 = '\$b\"\@\\\\\xB6'; EOT - $a = "\$b\"\@\\\xA3\x{100}"; + $a = "\$b\"\@\\\xB6\x{100}"; chop $a; TEST q(Data::Dumper->Dump([$a])), "utf8 flag with \" and \$"; if ($XS) { $WANT = <<'EOT'; # While this is "" string written inside "" here doc -#$VAR1 = "\$b\"\@\\\x{a3}"; +#$VAR1 = "\$b\"\@\\\x{b6}"; EOT TEST q(Data::Dumper->Dumpxs([$a])), "XS utf8 flag with \" and \$"; } - } # XS used to produce "$b\"' which is 4 chars, not 3. [ie wrongly qq(\$b\\\")] ############# $WANT = <<'EOT'; -- 1.8.3.1