+#############
+{
+ # [perl #74798] uncovered behaviour
+ $WANT = <<'EOW';
+#$VAR1 = "\0000";
+EOW
+ local $Data::Dumper::Useqq = 1;
+ TEST q(Data::Dumper->Dump(["\x000"])),
+ "\\ octal followed by digit";
+ TEST q(Data::Dumper->Dumpxs(["\x000"])), '\\ octal followed by digit (xs)'
+ if $XS;
+
+ $WANT = <<'EOW';
+#$VAR1 = "\x{100}\0000";
+EOW
+ local $Data::Dumper::Useqq = 1;
+ TEST q(Data::Dumper->Dump(["\x{100}\x000"])),
+ "\\ octal followed by digit unicode";
+ TEST q(Data::Dumper->Dumpxs(["\x{100}\x000"])), '\\ octal followed by digit unicode (xs)'
+ if $XS;
+
+
+ $WANT = <<'EOW';
+#$VAR1 = "\0\x{660}";
+EOW
+ TEST q(Data::Dumper->Dump(["\\x00\\x{0660}"])),
+ "\\ octal followed by unicode digit";
+ TEST q(Data::Dumper->Dumpxs(["\\x00\\x{0660}"])), '\\ octal followed by unicode digit (xs)'
+ if $XS;
+
+ # [perl #118933 - handling of digits
+$WANT = <<'EOW';
+#$VAR1 = 0;
+#$VAR2 = 1;
+#$VAR3 = 90;
+#$VAR4 = -10;
+#$VAR5 = "010";
+#$VAR6 = 112345678;
+#$VAR7 = "1234567890";
+EOW
+ TEST q(Data::Dumper->Dump([0, 1, 90, -10, "010", "112345678", "1234567890" ])),
+ "numbers and number-like scalars";
+
+ TEST q(Data::Dumper->Dumpxs([0, 1, 90, -10, "010", "112345678", "1234567890" ])),
+ "numbers and number-like scalars"
+ if $XS;
+}
+#############
+{
+ # [perl #82948]
+ # re::regexp_pattern was moved to universal.c in v5.10.0-252-g192c1e2
+ # and apparently backported to maint-5.10
+ $WANT = $] > 5.010 ? <<'NEW' : <<'OLD';
+#$VAR1 = qr/abc/;
+#$VAR2 = qr/abc/i;
+NEW
+#$VAR1 = qr/(?-xism:abc)/;
+#$VAR2 = qr/(?i-xsm:abc)/;
+OLD
+ TEST q(Data::Dumper->Dump([ qr/abc/, qr/abc/i ])), "qr//";
+ TEST q(Data::Dumper->Dumpxs([ qr/abc/, qr/abc/i ])), "qr// xs"
+ if $XS;
+}
+#############
+
+{
+ sub foo {}
+ $WANT = <<'EOW';
+#*a = sub { "DUMMY" };
+#$b = \&a;
+EOW
+
+ TEST q(Data::Dumper->new([ \&foo, \\&foo ], [ "*a", "b" ])->Dump), "name of code in *foo";
+ TEST q(Data::Dumper->new([ \&foo, \\&foo ], [ "*a", "b" ])->Dumpxs), "name of code in *foo xs"
+ if $XS;
+}
+#############
+
+{
+ if($] lt 5.007_003) {
+ SKIP_TEST "Test is only problematic for EBCDIC, which only works for >= 5.8";
+ SKIP_TEST "Test is only problematic for EBCDIC, which only works for >= 5.8";
+ }
+ else {
+ # There is special code to handle the single control that in EBCDIC is
+ # not in the block with all the other controls, when it is UTF-8 and
+ # there are no variants in it (All controls in EBCDIC are invariant.)
+ # This tests that. There is no harm in testing this works on ASCII,
+ # and is better to not have split code paths.
+ my $outlier = chr utf8::unicode_to_native(0x9F);
+ my $outlier_hex = sprintf "%x", ord $outlier;
+ $WANT = <<EOT;
+#\$VAR1 = \"\\x{$outlier_hex}\";
+EOT
+ $foo = "$outlier\x{100}";
+ chop $foo;
+ local $Data::Dumper::Useqq = 1;
+ TEST (q(Dumper($foo)), 'EBCDIC outlier control');
+ TEST (q(Data::Dumper::DumperX($foo)), 'EBCDIC outlier control: DumperX') if $XS;
+ }
+}