From: Gurusamy Sarathy Date: Sat, 13 Nov 1999 19:31:19 +0000 (+0000) Subject: revert non-kosher parts of change#4562 (sort order problems X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=091c0eb7afda954d4b458ffef52b90ee0ff8afe5;p=p5sagit%2Fp5-mst-13.2.git revert non-kosher parts of change#4562 (sort order problems should be ignored (on ebcdic) by fixing dumper.t/T() to sort result and expected lines; /[:ascii:]/ not working should be fixed, not ignored in regexp.t; result from sort should be fixed to be ascii portable on ebcdic, not ebcdic-specific) p4raw-link: @4562 on //depot/cfgperl: ee50adbe6978769b1ad873bd2be52593b054ff83 p4raw-id: //depot/perl@4574 --- diff --git a/t/lib/dumper.t b/t/lib/dumper.t index 505051f..9130d1c 100755 --- a/t/lib/dumper.t +++ b/t/lib/dumper.t @@ -9,8 +9,6 @@ BEGIN { } use Data::Dumper; -use Config; -my $Is_ebcdic = defined($Config{'ebcdic'}) && $Config{'ebcdic'} eq 'define'; $Data::Dumper::Pad = "#"; my $TMAX; @@ -240,20 +238,11 @@ EOT ############# 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" }; { @@ -288,7 +277,6 @@ EOT ############# 49 ## -if (!$Is_ebcdic) { $WANT = <<'EOT'; #$foo = \*::foo; #*::foo = \5; @@ -313,33 +301,6 @@ if (!$Is_ebcdic) { #@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; @@ -348,7 +309,6 @@ EOT ############# 55 ## -if (!$Is_ebcdic) { $WANT = <<'EOT'; #$foo = \*::foo; #*::foo = \5; @@ -370,30 +330,6 @@ if (!$Is_ebcdic) { #$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'])); @@ -401,7 +337,6 @@ EOT ############# 61 ## -if (!$Is_ebcdic) { $WANT = <<'EOT'; #@bar = ( # 10, @@ -423,37 +358,12 @@ if (!$Is_ebcdic) { #%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, @@ -475,37 +385,12 @@ if (!$Is_ebcdic) { #$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 = ( @@ -520,23 +405,6 @@ if (!$Is_ebcdic) { #); #%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; @@ -545,7 +413,6 @@ EOT ############# 79 ## -if (!$Is_ebcdic) { $WANT = <<'EOT'; #$foo = \*::foo; #$bar = [ @@ -560,23 +427,6 @@ if (!$Is_ebcdic) { #]; #$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; @@ -598,7 +448,6 @@ EOT ############# 85 ## -if (!$Is_ebcdic) { $WANT = <<'EOT'; #%kennels = ( # First => \'Fido', @@ -611,21 +460,6 @@ if (!$Is_ebcdic) { #); #%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], @@ -653,7 +487,6 @@ EOT ############# 97 ## -if (!$Is_ebcdic) { $WANT = <<'EOT'; #%kennels = ( # First => \'Fido', @@ -666,21 +499,6 @@ if (!$Is_ebcdic) { #); #%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); @@ -690,7 +508,6 @@ EOT ############# 103 ## -if (!$Is_ebcdic) { $WANT = <<'EOT'; #@dogs = ( # 'Fido', @@ -703,21 +520,6 @@ if (!$Is_ebcdic) { #%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], @@ -741,7 +543,6 @@ EOT ############# 115 ## -if (!$Is_ebcdic) { $WANT = <<'EOT'; #@dogs = ( # 'Fido', @@ -756,23 +557,6 @@ if (!$Is_ebcdic) { # 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)] ); diff --git a/t/op/regexp.t b/t/op/regexp.t index 74ca639..4ffe136 100755 --- a/t/op/regexp.t +++ b/t/op/regexp.t @@ -71,8 +71,6 @@ while () { $skip = ($skip_amp ? ($result =~ s/B//i) : ($result =~ s/B//)); # Certain tests don't work with utf8 (the re_test should be in UTF8) $skip = 1 if ($^H &= ~0x00000008) && $pat =~ /\[:\^(alnum|print|word):\]/; - # ebcdic platforms do not do [:ascii:] - $skip = 1 if ("\t" ne "\011") && $pat =~ /\[:\^?ascii:\]/; $result =~ s/B//i unless $skip; for $study ('', 'study \$subject') { $c = $iters; diff --git a/t/pragma/overload.t b/t/pragma/overload.t index f9a9c59..f673dce 100755 --- a/t/pragma/overload.t +++ b/t/pragma/overload.t @@ -759,12 +759,7 @@ else { }, 'deref'; # Hash: my @cont = sort %$deref; - if ("\t" eq "\011") { # ascii - test "@cont", '23 5 fake foo'; # 178 - } - else { # ebcdic alpha-numeric sort order - test "@cont", 'fake foo 23 5'; # 178 - } + test "@cont", '23 5 fake foo'; # 178 my @keys = sort keys %$deref; test "@keys", 'fake foo'; # 179 my @val = sort values %$deref;