summaryrefslogtreecommitdiff
path: root/t/lib
diff options
context:
space:
mode:
authorPhilippe Bruhat (BooK) <book@cpan.org>2022-10-24 01:22:59 +0200
committerYves Orton <demerphq@gmail.com>2023-02-25 00:49:18 +0800
commit8a487d3f1ae60a2317e9a756cc95a7e691e1dbd3 (patch)
tree28eadb1e9979aeccb5870ec7a5490342acbcf635 /t/lib
parent381382f7662757c39a652bbb70bd0b1a5c0be5f7 (diff)
downloadperl-8a487d3f1ae60a2317e9a756cc95a7e691e1dbd3.tar.gz
Replace 'experimental::smartmatch' by 'deprecated' in tests
Diffstat (limited to 't/lib')
-rw-r--r--t/lib/croak/pp_ctl2
-rw-r--r--t/lib/feature/switch30
-rw-r--r--t/lib/warnings/9uninit2
-rw-r--r--t/lib/warnings/op2
4 files changed, 18 insertions, 18 deletions
diff --git a/t/lib/croak/pp_ctl b/t/lib/croak/pp_ctl
index de0221b57d..a63cbd7849 100644
--- a/t/lib/croak/pp_ctl
+++ b/t/lib/croak/pp_ctl
@@ -41,7 +41,7 @@ EXPECT
Can't find label foo at - line 3.
########
# NAME when outside given
-use 5.01; no warnings 'experimental::smartmatch';
+use 5.01; no warnings 'deprecated';
when(undef){}
EXPECT
Can't "when" outside a topicalizer at - line 2.
diff --git a/t/lib/feature/switch b/t/lib/feature/switch
index 0dee7f51cf..4d379ea213 100644
--- a/t/lib/feature/switch
+++ b/t/lib/feature/switch
@@ -3,28 +3,28 @@ Check the lexical scoping of the switch keywords.
__END__
# No switch; given should be a bareword.
-use warnings; no warnings 'experimental::smartmatch';
+use warnings; no warnings 'deprecated';
print STDOUT given;
EXPECT
Unquoted string "given" may clash with future reserved word at - line 3.
given
########
# No switch; when should be a bareword.
-use warnings; no warnings 'experimental::smartmatch';
+use warnings; no warnings 'deprecated';
print STDOUT when;
EXPECT
Unquoted string "when" may clash with future reserved word at - line 3.
when
########
# No switch; default should be a bareword.
-use warnings; no warnings 'experimental::smartmatch';
+use warnings; no warnings 'deprecated';
print STDOUT default;
EXPECT
Unquoted string "default" may clash with future reserved word at - line 3.
default
########
# No switch; break should be a bareword.
-use warnings; no warnings 'experimental::smartmatch';
+use warnings; no warnings 'deprecated';
print STDOUT break;
EXPECT
Unquoted string "break" may clash with future reserved word at - line 3.
@@ -36,19 +36,19 @@ EXPECT
Can't "continue" outside a when block at - line 2.
########
# Use switch; so given is a keyword
-use feature 'switch'; no warnings 'experimental::smartmatch';
+use feature 'switch'; no warnings 'deprecated';
given("okay\n") { print }
EXPECT
okay
########
# Use switch; so when is a keyword
-use feature 'switch'; no warnings 'experimental::smartmatch';
+use feature 'switch'; no warnings 'deprecated';
given(1) { when(1) { print "okay" } }
EXPECT
okay
########
# Use switch; so default is a keyword
-use feature 'switch'; no warnings 'experimental::smartmatch';
+use feature 'switch'; no warnings 'deprecated';
given(1) { default { print "okay" } }
EXPECT
okay
@@ -60,7 +60,7 @@ EXPECT
Can't "break" outside a given block at - line 3.
########
# switch out of scope; given should be a bareword.
-use warnings; no warnings 'experimental::smartmatch';
+use warnings; no warnings 'deprecated';
{ use feature 'switch';
given (1) {print "Okay here\n";}
}
@@ -71,7 +71,7 @@ Okay here
given
########
# switch out of scope; when should be a bareword.
-use warnings; no warnings 'experimental::smartmatch';
+use warnings; no warnings 'deprecated';
{ use feature 'switch';
given (1) { when(1) {print "Okay here\n";} }
}
@@ -82,7 +82,7 @@ Okay here
when
########
# switch out of scope; default should be a bareword.
-use warnings; no warnings 'experimental::smartmatch';
+use warnings; no warnings 'deprecated';
{ use feature 'switch';
given (1) { default {print "Okay here\n";} }
}
@@ -93,7 +93,7 @@ Okay here
default
########
# switch out of scope; break should be a bareword.
-use warnings; no warnings 'experimental::smartmatch';
+use warnings; no warnings 'deprecated';
{ use feature 'switch';
given (1) { break }
}
@@ -103,7 +103,7 @@ Unquoted string "break" may clash with future reserved word at - line 6.
break
########
# C<no feature 'switch'> should work
-use warnings; no warnings 'experimental::smartmatch';
+use warnings; no warnings 'deprecated';
use feature 'switch';
given (1) { when(1) {print "Okay here\n";} }
no feature 'switch';
@@ -114,7 +114,7 @@ Okay here
when
########
# C<no feature> should work too
-use warnings; no warnings 'experimental::smartmatch';
+use warnings; no warnings 'deprecated';
use feature 'switch';
given (1) { when(1) {print "Okay here\n";} }
no feature;
@@ -125,14 +125,14 @@ Okay here
when
########
# Without the feature, no 'Unambiguous use of' warning:
-use warnings; no warnings 'experimental::smartmatch';
+use warnings; no warnings 'deprecated';
@break = ($break = "break");
print ${break}, ${break[0]};
EXPECT
breakbreak
########
# With the feature, we get an 'Unambiguous use of' warning:
-use warnings; no warnings 'experimental::smartmatch';
+use warnings; no warnings 'deprecated';
use feature 'switch';
@break = ($break = "break");
print ${break}, ${break[0]};
diff --git a/t/lib/warnings/9uninit b/t/lib/warnings/9uninit
index 5c173fdb2a..0ceb0d240a 100644
--- a/t/lib/warnings/9uninit
+++ b/t/lib/warnings/9uninit
@@ -1943,7 +1943,7 @@ $v = 1 + prototype $fn;
EXPECT
Use of uninitialized value in addition (+) at - line 4.
########
-use warnings 'uninitialized'; no warnings 'experimental::smartmatch';
+use warnings 'uninitialized'; no warnings 'deprecated';
my $v;
my $fn = sub {};
$v = 1 + (1 ~~ $fn);
diff --git a/t/lib/warnings/op b/t/lib/warnings/op
index 4ef9d565f1..d9de0a441f 100644
--- a/t/lib/warnings/op
+++ b/t/lib/warnings/op
@@ -363,7 +363,7 @@ OPTION fatal
Can't use an array as a reference at - line 3.
########
# op.c
-use warnings 'void' ; no warnings 'experimental::smartmatch'; close STDIN ;
+use warnings 'void' ; no warnings 'deprecated'; close STDIN ;
#line 2
1 x 3 ; # OP_REPEAT (folded)
(1) x 3 ; # OP_REPEAT