Skip to content

Commit 2b766f7

Browse files
committed
Update t/uni/labels.t
1 parent 50214ff commit 2b766f7

File tree

1 file changed

+14
-9
lines changed

1 file changed

+14
-9
lines changed

t/uni/labels.t

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,10 @@ SKIP: {
4747

4848
eval "last E";
4949
like $@, qr/Label not found for "last E" at/u, "last's error is UTF-8 clean";
50-
50+
5151
eval "redo E";
5252
like $@, qr/Label not found for "redo E" at/u, "redo's error is UTF-8 clean";
53-
53+
5454
eval "next E";
5555
like $@, qr/Label not found for "next E" at/u, "next's error is UTF-8 clean";
5656
}
@@ -75,12 +75,17 @@ like $@, qr/Unrecognized character/, "redo to downgradeable labels";
7575
is $d, 0, "Latin-1 labels are reachable";
7676

7777
{
78-
no warnings;
79-
goto ここ;
80-
81-
if (undef) {
82-
ここ: {
83-
pass("goto UTF-8 LABEL works.");
78+
local $@;
79+
eval {
80+
goto ここ;
81+
82+
if (undef) {
83+
ここ: {
84+
my $x = "jump goto UTF-8 LABEL no longer works";
85+
}
8486
}
85-
}
87+
};
88+
like($@,
89+
qr/Use of \"goto\" to jump into a construct is no longer permitted/,
90+
"Got expected error message");
8691
}

0 commit comments

Comments
 (0)