Skip to content

Commit 656f8d5

Browse files
committed
Remove commented-out tests, per review
1 parent 6124635 commit 656f8d5

File tree

1 file changed

+0
-58
lines changed

1 file changed

+0
-58
lines changed

t/porting/deprecation.t

Lines changed: 0 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -90,61 +90,3 @@ if (-e ".git") {
9090
"There should not be any new files which mention WARN_DEPRECATED");
9191
}
9292

93-
# TODO: We don't need the 3 following test blocks for "Use of goto to jump
94-
# into a construct is deprecated" anymore ... but we may have been using these
95-
# blocks to test deprecation warnings more generally. Hence, comment them out
96-
# for now (so that 'make test_porting' passes) and investigate further later.
97-
#
98-
## Test that deprecation warnings are produced under "use warnings"
99-
## (set above)
100-
#{
101-
# my $warning = "nada";
102-
# local $SIG{__WARN__} = sub { $warning = $_[0] };
103-
# my $count = 0;
104-
# while ($count<1) {
105-
# LABEL: $count++;
106-
# goto DONE if $count>1;
107-
# }
108-
# goto LABEL;
109-
# DONE:
110-
# like($warning,
111-
# qr/Use of "goto" to jump into a construct is deprecated, and will become fatal in Perl 5\.42/,
112-
# "Got expected deprecation warning");
113-
#}
114-
## Test that we can silence deprecation warnings with "no warnings 'deprecated'"
115-
## as we used to.
116-
#{
117-
# no warnings 'deprecated';
118-
# my $warning = "nada";
119-
# local $SIG{__WARN__} = sub { $warning = $_[0] };
120-
# my $count = 0;
121-
# while ($count<1) {
122-
# LABEL: $count++;
123-
# goto DONE if $count>1;
124-
# }
125-
# goto LABEL;
126-
# DONE:
127-
# like($warning, qr/nada/,
128-
# "no warnings 'deprecated'; silenced deprecation warning as expected");
129-
#}
130-
131-
## Test that we can silence a specific deprecation warnings with "no warnings 'deprecated::$subcategory'"
132-
## and that by doing so we don't silence any other deprecation warnings.
133-
#{
134-
# no warnings 'deprecated::goto_construct';
135-
# my $warning = "nada";
136-
# local $SIG{__WARN__} = sub { $warning = $_[0] };
137-
# my $count = 0;
138-
# while ($count<1) {
139-
# LABEL: $count++;
140-
# goto DONE if $count>1;
141-
# }
142-
# goto LABEL;
143-
# DONE:
144-
# like($warning, qr/nada/,
145-
# "no warnings 'deprecated::goto_construct'; silenced deprecation warning as expected");
146-
# @INC = ();
147-
# do "regen.pl"; # this should produce a deprecation warning
148-
# like($warning, qr/is no longer in \@INC/,
149-
# "no warnings 'deprecated::goto_construct'; did not silence deprecated::dot_in_inc warnings");
150-
#}

0 commit comments

Comments
 (0)