Skip to content

Commit dd6a9d4

Browse files
fglockcodex
andcommitted
fix: restore advanced regex test completion
Keep Perl's lowercase regex debug pragma distinct from the unsupported capitalized selective Debug API. Scale the upstream pat_advanced watchdog in the resource-aware runner so both direct and thread-wrapper variants complete their final fresh-process stress loop. Generated with [Codex](https://openai.com/codex) Co-Authored-By: Codex <codex@openai.com>
1 parent 669531e commit dd6a9d4

2 files changed

Lines changed: 11 additions & 8 deletions

File tree

dev/tools/perl_test_runner.pl

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -250,11 +250,14 @@ sub run_single_test {
250250
# preserving any larger timeout requested by the caller.
251251
my $test_timeout = timeout_for_test($test_file);
252252

253-
# gv.t has its own watchdog and scales it through this upstream variable.
254-
# Keep a caller's larger value, but do not let the internal deadline expire
255-
# before the resource-aware runner's outer deadline.
253+
# These tests have their own watchdogs and scale them through this upstream
254+
# variable. Keep a caller's larger value, but do not let an internal
255+
# deadline expire before the resource-aware runner's outer deadline.
256256
local $ENV{PERL_TEST_TIMEOUT_FACTOR} = $ENV{PERL_TEST_TIMEOUT_FACTOR};
257-
if ($test_file =~ m{(?:^|/)perl5_t/t/op/gv\.t$}
257+
if ($test_file =~ m{
258+
(?:^|/)perl5_t/t/op/gv\.t$
259+
| (?:^|/)perl5_t/t/re/pat_advanced(?:_thr)?\.t$
260+
}x
258261
&& (!defined($ENV{PERL_TEST_TIMEOUT_FACTOR})
259262
|| $ENV{PERL_TEST_TIMEOUT_FACTOR} < 2)) {
260263
$ENV{PERL_TEST_TIMEOUT_FACTOR} = 2;

src/main/java/org/perlonjava/runtime/perlmodule/Re.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -168,9 +168,9 @@ public static RuntimeList importRe(RuntimeArray args, int ctx) {
168168
symbolTable.enableStrictOption(Strict.HINT_RE_EVAL);
169169
} else if (opt.equalsIgnoreCase("taint")) {
170170
symbolTable.enableStrictOption(Strict.HINT_RE_TAINT);
171-
} else if (opt.equalsIgnoreCase("debug")) {
171+
} else if (opt.equals("debug")) {
172172
symbolTable.enableStrictOption(Strict.HINT_RE_DEBUG);
173-
} else if (opt.equalsIgnoreCase("debugcolor")) {
173+
} else if (opt.equals("debugcolor")) {
174174
symbolTable.enableStrictOption(Strict.HINT_RE_DEBUG | Strict.HINT_RE_DEBUGCOLOR);
175175
} else if (opt.equals("/a")) {
176176
// use re '/a' - ASCII-restrict regex character classes
@@ -207,9 +207,9 @@ public static RuntimeList unimportRe(RuntimeArray args, int ctx) {
207207
symbolTable.disableStrictOption(Strict.HINT_RE_EVAL);
208208
} else if (opt.equalsIgnoreCase("taint")) {
209209
symbolTable.disableStrictOption(Strict.HINT_RE_TAINT);
210-
} else if (opt.equalsIgnoreCase("debug")) {
210+
} else if (opt.equals("debug")) {
211211
symbolTable.disableStrictOption(Strict.HINT_RE_DEBUG | Strict.HINT_RE_DEBUGCOLOR);
212-
} else if (opt.equalsIgnoreCase("debugcolor")) {
212+
} else if (opt.equals("debugcolor")) {
213213
symbolTable.disableStrictOption(Strict.HINT_RE_DEBUGCOLOR);
214214
} else if (opt.equals("/a") || opt.equals("/aa")) {
215215
symbolTable.disableStrictOption(Strict.HINT_RE_ASCII | Strict.HINT_RE_ASCII_AA);

0 commit comments

Comments
 (0)