Skip to content

Commit 6cc07d1

Browse files
committed
reg_mesg.t: Only one error per test
This just fills out a couple of tests so that they don't prematurely end. That makes it clear that the eorror that does get shown isn't also due to other mistakes in the test.
1 parent 4222a60 commit 6cc07d1

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

β€Žt/re/reg_mesg.tβ€Ž

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ my @death =
176176
'/(?/' => 'Sequence (? incomplete {#} m/(?{#}/',
177177

178178
'/(?;x/' => 'Sequence (?;...) not recognized {#} m/(?;{#}x/',
179-
'/(?<;x/' => 'Group name must start with a non-digit word character {#} m/(?<;{#}x/',
179+
'/(?<;name>match)/' => 'Group name must start with a non-digit word character {#} m/(?<;{#}name>match)/',
180180
'/(?\ix/' => 'Sequence (?\...) not recognized {#} m/(?\{#}ix/',
181181
'/(?\mx/' => 'Sequence (?\...) not recognized {#} m/(?\{#}mx/',
182182
'/(?\:x/' => 'Sequence (?\...) not recognized {#} m/(?\{#}:x/',
@@ -222,7 +222,7 @@ my @death =
222222
'/\g{-abc}/' => 'Group name must start with a non-digit word character {#} m/\g{-{#}abc}/',
223223
'/\g{1-1}/' => 'Sequence \g{... not terminated {#} m/\g{1{#}-1}/',
224224
'/\g{ -1 foo }/' => 'Sequence \g{... not terminated {#} m/\g{ -1 {#}foo }/',
225-
'/(?<;x/' => 'Group name must start with a non-digit word character {#} m/(?<;{#}x/',
225+
'/(?<;name>match)/' => 'Group name must start with a non-digit word character {#} m/(?<;{#}name>match)/',
226226

227227
'my $m = "\\\"; $m =~ $m', => 'Trailing \ in regex m/\/',
228228

@@ -310,7 +310,7 @@ my @death =
310310
'm/(?&a/' => 'Sequence (?&... not terminated {#} m/(?&a{#}/',
311311
'm/(?P=/' => 'Sequence ?P=... not terminated {#} m/(?P={#}/',
312312
"m/(?'/" => "Sequence (?'... not terminated {#} m/(?'{#}/",
313-
"m/(?</" => "Sequence (?<... not terminated {#} m/(?<{#}/",
313+
"m/(?<name)/" => "Sequence (?<... not terminated {#} m/(?<name{#})/",
314314
'm/(?&/' => 'Sequence (?&... not terminated {#} m/(?&{#}/',
315315
'm/(?(</' => 'Sequence (?(<... not terminated {#} m/(?(<{#}/',
316316
"m/(?('/" => "Sequence (?('... not terminated {#} m/(?('{#}/",
@@ -485,7 +485,7 @@ my @death_utf8 = mark_as_utf8(
485485
'/ネ(?/' => 'Sequence (? incomplete {#} m/ネ(?{#}/',
486486

487487
'/ネ(?;ネ/' => 'Sequence (?;...) not recognized {#} m/ネ(?;{#}ネ/',
488-
'/ネ(?<;ネ/' => 'Group name must start with a non-digit word character {#} m/ネ(?<;{#}ネ/',
488+
'/ネ(?<;name>match)ネ/' => 'Group name must start with a non-digit word character {#} m/ネ(?<;{#}name>match)ネ/',
489489
'/ネ(?\ixネ/' => 'Sequence (?\...) not recognized {#} m/ネ(?\{#}ixネ/',
490490
'/ネ(?^lu:ネ)/' => 'Regexp modifiers "l" and "u" are mutually exclusive {#} m/ネ(?^lu{#}:ネ)/',
491491
'/ネ(?lil:ネ)/' => 'Regexp modifier "l" may not appear twice {#} m/ネ(?lil{#}:ネ)/',

0 commit comments

Comments
Β (0)