Skip to content

test invalid chars in string#34

Open
tdhock wants to merge 2 commits intomasterfrom
test-invalid
Open

test invalid chars in string#34
tdhock wants to merge 2 commits intomasterfrom
test-invalid

Conversation

@tdhock
Copy link
Copy Markdown
Owner

@tdhock tdhock commented Feb 12, 2026

on CI we have

══ Failed tests ════════════════════════════════════════════════════════════════
── Failure ('test-CRAN-all.R:191:3'): RE2 before_pattern on invalid R string should work ──
Expected `names(match_dt_list)` to be identical to `base_names`.
Differences:
Lengths differ: 1 is not 3
── Failure ('test-CRAN-all.R:191:3'): ICU before_pattern on invalid R string should work ──
Expected `names(match_dt_list)` to be identical to `base_names`.
Differences:
Lengths differ: 1 is not 3
── Failure ('test-CRAN-all.R:191:3'): PCRE before_pattern on invalid R string should work ──
Expected `names(match_dt_list)` to be identical to `base_names`.
Differences:
Lengths differ: 1 is not 3

[ FAIL 3 | WARN 0 | SKIP 0 | PASS 702 ]

but locally we have

── Failed tests ────────────────────────────────────────────────────────────────
Error (test-CRAN-all.R:189:5): PCRE before_pattern on invalid R string should work
Error in `dimnames(x) <- dn`: length of 'dimnames' [2] not equal to array extent
Backtrace:
    ▆
 1. └─nc::capture_all_str(f, before_pattern) at test-CRAN-all.R:189:5
 2.   └─nc:::apply_type_funs(group.mat, L[["fun.list"]]) at nc/R/capture_all_str.R:67:3
 3.     └─base::`colnames<-`(`*tmp*`, value = names(fun.list)) at nc/R/apply_type_funs.R:16:3

[ FAIL 1 | WARN 1 | SKIP 0 | PASS 704 ]

since PCRE does not work but the other engines do, this seems to be an issue in base R.
gregexpr() should return attributes, even when there is no match in bad string.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant