diff options
author | Dagfinn Ilmari Mannsåker <ilmari@ilmari.org> | 2017-10-18 01:01:11 +0100 |
---|---|---|
committer | Dagfinn Ilmari Mannsåker <ilmari@ilmari.org> | 2018-09-26 13:00:19 +0100 |
commit | c22e17d0af032be4fb2cd747c9bb7a7622e3ba64 (patch) | |
tree | 9781a06bc165ea4ee0c1148a07e0d551ada81a4d /t/op | |
parent | b48c08b9845692aded457ece78aa7d05316e9be3 (diff) | |
download | perl-c22e17d0af032be4fb2cd747c9bb7a7622e3ba64.tar.gz |
Remove support for setting $[ to a non-zero value
This removes arybase and all its surrounding machinery.
Diffstat (limited to 't/op')
-rw-r--r-- | t/op/array_base.t | 41 | ||||
-rw-r--r-- | t/op/magic.t | 4 |
2 files changed, 2 insertions, 43 deletions
diff --git a/t/op/array_base.t b/t/op/array_base.t deleted file mode 100644 index a30236d955..0000000000 --- a/t/op/array_base.t +++ /dev/null @@ -1,41 +0,0 @@ -#!perl -w -use strict; - -BEGIN { - chdir 't' if -d 't'; - require './test.pl'; - - plan (tests => my $tests = 11); - - # Run these at BEGIN time, before arybase loads - use v5.15; - is(eval('$[ = 1; 123'), undef); - like($@, qr/\AAssigning non-zero to \$\[ is no longer possible/); - - if (is_miniperl()) { - # skip the rest - SKIP: { skip ("no arybase.xs on miniperl", $tests-2) } - exit; - } -} - -no warnings 'deprecated'; - -is(eval('$['), 0); -is(eval('$[ = 0; 123'), 123); -is(eval('$[ = 1; 123'), 123); -$[ = 1; -ok $INC{'arybase.pm'}; - -use v5.15; -is(eval('$[ = 1; 123'), undef); -like($@, qr/\AAssigning non-zero to \$\[ is no longer possible/); -is $[, 0, '$[ is 0 under 5.16'; -$_ = "hello"; -/l/g; -my $pos = \pos; -is $$pos, 3; -$$pos = 1; -is $$pos, 1; - -1; diff --git a/t/op/magic.t b/t/op/magic.t index 02ced156d5..f53cc5e00d 100644 --- a/t/op/magic.t +++ b/t/op/magic.t @@ -5,7 +5,7 @@ BEGIN { chdir 't' if -d 't'; require './test.pl'; set_up_inc( '../lib' ); - plan (tests => 196); # some tests are run in BEGIN block + plan (tests => 195); # some tests are run in BEGIN block } # Test that defined() returns true for magic variables created on the fly, @@ -615,7 +615,7 @@ SKIP: { SKIP: { skip_if_miniperl("No XS in miniperl", 3); - for ( [qw( %- Tie::Hash::NamedCapture )], [qw( $[ arybase )], + for ( [qw( %- Tie::Hash::NamedCapture )], [qw( %! Errno )] ) { my ($var, $mod) = @$_; my $modfile = $mod =~ s|::|/|gr . ".pm"; |