diff options
Diffstat (limited to 't/op')
-rw-r--r-- | t/op/cmpchain.t | 4 | ||||
-rw-r--r-- | t/op/coreamp.t | 4 | ||||
-rw-r--r-- | t/op/smartmatch.t | 8 | ||||
-rw-r--r-- | t/op/state.t | 2 | ||||
-rw-r--r-- | t/op/switch.t | 2 | ||||
-rw-r--r-- | t/op/taint.t | 3 | ||||
-rw-r--r-- | t/op/tie_fetch_count.t | 2 |
7 files changed, 14 insertions, 11 deletions
diff --git a/t/op/cmpchain.t b/t/op/cmpchain.t index 48aaabf1e5..13672b836c 100644 --- a/t/op/cmpchain.t +++ b/t/op/cmpchain.t @@ -7,7 +7,6 @@ BEGIN { } use feature "isa"; -no warnings qw(experimental::smartmatch); my @cheqop = qw(== != eq ne); my @nceqop = qw(<=> cmp ~~); @@ -15,18 +14,21 @@ my @chrelop = qw(< > <= >= lt gt le ge); my @ncrelop = qw(isa); foreach my $c0 (@nceqop) { + no warnings qw(deprecated); foreach my $c1 (@nceqop) { is eval("sub { \$a $c0 \$b $c1 \$c }"), undef, "$c0 $c1 non-associative"; } } foreach my $c (@nceqop) { + no warnings qw(deprecated); foreach my $e (@cheqop) { is eval("sub { \$a $c \$b $e \$c }"), undef, "$c $e non-associative"; is eval("sub { \$a $e \$b $c \$c }"), undef, "$e $c non-associative"; } } foreach my $c (@nceqop) { + no warnings qw(deprecated); foreach my $e0 (@cheqop) { foreach my $e1 (@cheqop) { is eval("sub { \$a $c \$b $e0 \$c $e1 \$d }"), undef, diff --git a/t/op/coreamp.t b/t/op/coreamp.t index ca39c2c555..588b4ed505 100644 --- a/t/op/coreamp.t +++ b/t/op/coreamp.t @@ -15,8 +15,6 @@ BEGIN { $^P |= 0x100; # Provide informative "file" names for evals } -no warnings 'experimental::smartmatch'; - sub lis($$;$) { &is(map(@$_ ? "[@{[map $_//'~~u~~', @$_]}]" : 'nought', @_[0,1]), $_[2]); } @@ -375,6 +373,7 @@ test_proto 'break'; { $tests ++; my $tmp; + no warnings 'deprecated'; CORE::given(1) { CORE::when(1) { &mybreak; @@ -463,6 +462,7 @@ SKIP: test_proto 'continue'; $tests ++; +no warnings 'deprecated'; CORE::given(1) { CORE::when(1) { &mycontinue(); diff --git a/t/op/smartmatch.t b/t/op/smartmatch.t index 10d35390d7..ca85d15785 100644 --- a/t/op/smartmatch.t +++ b/t/op/smartmatch.t @@ -8,7 +8,7 @@ BEGIN { use strict; use warnings; no warnings 'uninitialized'; -no warnings 'experimental::smartmatch'; +no warnings 'deprecated'; # smartmatch is deprecated and will be removed in 5.042 ++$|; @@ -146,7 +146,7 @@ sub NOT_DEF() { undef } # re-introduced it will probably crash in one of the many smoke # builds. fresh_perl_is('print (q(x) ~~ q(x)) | (/x/ ~~ %!)', "1", - { switches => [ "-MErrno", "-M-warnings=experimental::smartmatch" ] }, + { switches => [ "-MErrno", "-M-warnings=deprecated" ] }, "don't fill the stack with rubbish"); } @@ -194,10 +194,10 @@ sub NOT_DEF() { undef } # if there was some other operator's arguments left on the stack, as with # the test cases. fresh_perl_is('print(0->[0 =~ qr/1/ ~~ 0])', '', - { switches => [ "-M-warnings=experimental::smartmatch" ] }, + { switches => [ "-M-warnings=deprecated" ] }, "don't qr-ify left-side match against a stacked argument"); fresh_perl_is('print(0->[0 ~~ (0 =~ qr/1/)])', '', - { switches => [ "-M-warnings=experimental::smartmatch" ] }, + { switches => [ "-M-warnings=deprecated" ] }, "don't qr-ify right-side match against a stacked argument"); } diff --git a/t/op/state.t b/t/op/state.t index 7aef435ffd..747e316f22 100644 --- a/t/op/state.t +++ b/t/op/state.t @@ -346,7 +346,7 @@ foreach my $x (0 .. 4) { # my @spam = qw [spam ham bacon beans]; foreach my $spam (@spam) { - no warnings 'experimental::smartmatch'; + no warnings 'deprecated'; given (state $spam = $spam) { when ($spam [0]) {ok 1, "given"} default {ok 0, "given"} diff --git a/t/op/switch.t b/t/op/switch.t index dbfd906e2a..e1c079956f 100644 --- a/t/op/switch.t +++ b/t/op/switch.t @@ -8,7 +8,7 @@ BEGIN { use strict; use warnings; -no warnings 'experimental::smartmatch'; +no warnings 'deprecated'; plan tests => 197; diff --git a/t/op/taint.t b/t/op/taint.t index b4b590ef5d..daeb164efa 100644 --- a/t/op/taint.t +++ b/t/op/taint.t @@ -2453,6 +2453,7 @@ EOF my $desc = "tainted value returned from " . shift(@descriptions); my $res = do { + no warnings 'deprecated'; given ($_) { when ('x') { $letter } when ('y') { goto leavegiven } @@ -2482,7 +2483,7 @@ EOF # Tainted values with smartmatch # [perl #93590] S_do_smartmatch stealing its own string buffers { -no warnings 'experimental::smartmatch'; +no warnings 'deprecated'; ok "M$TAINT" ~~ ['m', 'M'], '$tainted ~~ ["whatever", "match"]'; ok !("M$TAINT" ~~ ['m', undef]), '$tainted ~~ ["whatever", undef]'; } diff --git a/t/op/tie_fetch_count.t b/t/op/tie_fetch_count.t index d8b906d7ab..86505f6eba 100644 --- a/t/op/tie_fetch_count.t +++ b/t/op/tie_fetch_count.t @@ -165,7 +165,7 @@ $_ = "foo"; $dummy = $var =~ m/ / ; check_count 'm//'; $dummy = $var =~ s/ //; check_count 's///'; { - no warnings 'experimental::smartmatch'; + no warnings 'deprecated'; $dummy = $var ~~ 1 ; check_count '~~'; } $dummy = $var =~ y/ //; check_count 'y///'; |