}
use Data::Dumper;
+use Config;
+my $Is_ebcdic = defined($Config{'ebcdic'}) && $Config{'ebcdic'} eq 'define';
$Data::Dumper::Pad = "#";
my $TMAX;
############# 43
##
+if (!$Is_ebcdic) {
$WANT = <<'EOT';
#$VAR1 = {
# "abc\0'\efg" => "mno\0"
#};
EOT
+}
+else {
+$WANT = <<"EOT";
+#\$VAR1 = {
+# "\\201\\202\\203\\340\\360'\e\\206\\207" => "\\224\\225\\226\\340\\360"
+#};
+EOT
+}
$foo = { "abc\000\'\efg" => "mno\000" };
{
############# 49
##
+if (!$Is_ebcdic) {
$WANT = <<'EOT';
#$foo = \*::foo;
#*::foo = \5;
#@bar = @{*::foo{ARRAY}};
#%baz = %{*::foo{ARRAY}->[2]};
EOT
+}
+else {
+ $WANT = <<'EOT';
+#$foo = \*::foo;
+#*::foo = \5;
+#*::foo = [
+# #0
+# 10,
+# #1
+# '',
+# #2
+# {
+# 'd' => {},
+# 'a' => 1,
+# 'b' => '',
+# 'c' => []
+# }
+# ];
+#*::foo{ARRAY}->[1] = $foo;
+#*::foo{ARRAY}->[2]{'d'} = *::foo{ARRAY}->[2];
+#*::foo{ARRAY}->[2]{'b'} = *::foo{SCALAR};
+#*::foo{ARRAY}->[2]{'c'} = *::foo{ARRAY};
+#*::foo = *::foo{ARRAY}->[2];
+#@bar = @{*::foo{ARRAY}};
+#%baz = %{*::foo{ARRAY}->[2]};
+EOT
+}
$Data::Dumper::Purity = 1;
$Data::Dumper::Indent = 3;
############# 55
##
+if (!$Is_ebcdic) {
$WANT = <<'EOT';
#$foo = \*::foo;
#*::foo = \5;
#$bar = *::foo{ARRAY};
#$baz = *::foo{ARRAY}->[2];
EOT
+}
+else {
+ $WANT = <<'EOT';
+#$foo = \*::foo;
+#*::foo = \5;
+#*::foo = [
+# 10,
+# '',
+# {
+# 'd' => {},
+# 'a' => 1,
+# 'b' => '',
+# 'c' => []
+# }
+#];
+#*::foo{ARRAY}->[1] = $foo;
+#*::foo{ARRAY}->[2]{'d'} = *::foo{ARRAY}->[2];
+#*::foo{ARRAY}->[2]{'b'} = *::foo{SCALAR};
+#*::foo{ARRAY}->[2]{'c'} = *::foo{ARRAY};
+#*::foo = *::foo{ARRAY}->[2];
+#$bar = *::foo{ARRAY};
+#$baz = *::foo{ARRAY}->[2];
+EOT
+}
$Data::Dumper::Indent = 1;
TEST q(Data::Dumper->Dump([\\*foo, \\@foo, \\%foo], ['foo', 'bar', 'baz']));
############# 61
##
+if (!$Is_ebcdic) {
$WANT = <<'EOT';
#@bar = (
# 10,
#%baz = %{*::foo{HASH}};
#$foo = $bar[1];
EOT
+}
+else {
+ $WANT = <<'EOT';
+#@bar = (
+# 10,
+# \*::foo,
+# {}
+#);
+#*::foo = \5;
+#*::foo = \@bar;
+#*::foo = {
+# 'd' => {},
+# 'a' => 1,
+# 'b' => '',
+# 'c' => []
+#};
+#*::foo{HASH}->{'d'} = *::foo{HASH};
+#*::foo{HASH}->{'b'} = *::foo{SCALAR};
+#*::foo{HASH}->{'c'} = \@bar;
+#$bar[2] = *::foo{HASH};
+#%baz = %{*::foo{HASH}};
+#$foo = $bar[1];
+EOT
+}
TEST q(Data::Dumper->Dump([\\@foo, \\%foo, \\*foo], ['*bar', '*baz', '*foo']));
TEST q(Data::Dumper->Dumpxs([\\@foo, \\%foo, \\*foo], ['*bar', '*baz', '*foo'])) if $XS;
############# 67
##
+if (!$Is_ebcdic) {
$WANT = <<'EOT';
#$bar = [
# 10,
#$baz = *::foo{HASH};
#$foo = $bar->[1];
EOT
+}
+else {
+ $WANT = <<'EOT';
+#$bar = [
+# 10,
+# \*::foo,
+# {}
+#];
+#*::foo = \5;
+#*::foo = $bar;
+#*::foo = {
+# 'd' => {},
+# 'a' => 1,
+# 'b' => '',
+# 'c' => []
+#};
+#*::foo{HASH}->{'d'} = *::foo{HASH};
+#*::foo{HASH}->{'b'} = *::foo{SCALAR};
+#*::foo{HASH}->{'c'} = $bar;
+#$bar->[2] = *::foo{HASH};
+#$baz = *::foo{HASH};
+#$foo = $bar->[1];
+EOT
+}
TEST q(Data::Dumper->Dump([\\@foo, \\%foo, \\*foo], ['bar', 'baz', 'foo']));
TEST q(Data::Dumper->Dumpxs([\\@foo, \\%foo, \\*foo], ['bar', 'baz', 'foo'])) if $XS;
############# 73
##
+if (!$Is_ebcdic) {
$WANT = <<'EOT';
#$foo = \*::foo;
#@bar = (
#);
#%baz = %{$bar[2]};
EOT
+}
+else {
+ $WANT = <<'EOT';
+#$foo = \*::foo;
+#@bar = (
+# 10,
+# $foo,
+# {
+# d => $bar[2],
+# a => 1,
+# b => \5,
+# c => \@bar
+# }
+#);
+#%baz = %{$bar[2]};
+EOT
+}
$Data::Dumper::Purity = 0;
$Data::Dumper::Quotekeys = 0;
############# 79
##
+if (!$Is_ebcdic) {
$WANT = <<'EOT';
#$foo = \*::foo;
#$bar = [
#];
#$baz = $bar->[2];
EOT
+}
+else {
+ $WANT = <<'EOT';
+#$foo = \*::foo;
+#$bar = [
+# 10,
+# $foo,
+# {
+# d => $bar->[2],
+# a => 1,
+# b => \5,
+# c => $bar
+# }
+#];
+#$baz = $bar->[2];
+EOT
+}
TEST q(Data::Dumper->Dump([\\*foo, \\@foo, \\%foo], ['foo', 'bar', 'baz']));
TEST q(Data::Dumper->Dumpxs([\\*foo, \\@foo, \\%foo], ['foo', 'bar', 'baz'])) if $XS;
############# 85
##
+if (!$Is_ebcdic) {
$WANT = <<'EOT';
#%kennels = (
# First => \'Fido',
#);
#%mutts = %kennels;
EOT
+}
+else {
+ $WANT = <<'EOT';
+#%kennels = (
+# Second => \'Wags',
+# First => \'Fido'
+#);
+#@dogs = (
+# ${$kennels{First}},
+# ${$kennels{Second}},
+# \%kennels
+#);
+#%mutts = %kennels;
+EOT
+}
TEST q(
$d = Data::Dumper->new([\\%kennel, \\@dogs, $mutts],
############# 97
##
+if (!$Is_ebcdic) {
$WANT = <<'EOT';
#%kennels = (
# First => \'Fido',
#);
#%mutts = %kennels;
EOT
+}
+else {
+ $WANT = <<'EOT';
+#%kennels = (
+# Second => \'Wags',
+# First => \'Fido'
+#);
+#@dogs = (
+# ${$kennels{First}},
+# ${$kennels{Second}},
+# \%kennels
+#);
+#%mutts = %kennels;
+EOT
+}
TEST q($d->Reset; $d->Dump);
############# 103
##
+if (!$Is_ebcdic) {
$WANT = <<'EOT';
#@dogs = (
# 'Fido',
#%kennels = %{$dogs[2]};
#%mutts = %{$dogs[2]};
EOT
+}
+else {
+ $WANT = <<'EOT';
+#@dogs = (
+# 'Fido',
+# 'Wags',
+# {
+# Second => \$dogs[1],
+# First => \$dogs[0]
+# }
+#);
+#%kennels = %{$dogs[2]};
+#%mutts = %{$dogs[2]};
+EOT
+}
TEST q(
$d = Data::Dumper->new([\\@dogs, \\%kennel, $mutts],
############# 115
##
+if (!$Is_ebcdic) {
$WANT = <<'EOT';
#@dogs = (
# 'Fido',
# Second => \'Wags'
#);
EOT
+}
+else {
+ $WANT = <<'EOT';
+#@dogs = (
+# 'Fido',
+# 'Wags',
+# {
+# Second => \'Wags',
+# First => \'Fido'
+# }
+#);
+#%kennels = (
+# Second => \'Wags',
+# First => \'Fido'
+#);
+EOT
+}
TEST q(
$d = Data::Dumper->new( [\@dogs, \%kennel], [qw(*dogs *kennels)] );