-
-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug]: Failing test UTF characters are replaced differently #629
Comments
I think that only breaks on Windows And you can see that it has been failing for the last 2 weeks |
# Pull Request Fixes #623 After 1 year with an error and with `verify()` in place, it makes sense to remove them. I didn't keep any documentation or redirect users to other functions/examples, (but it is hard for me to guess if users might not know how to update their code). The checks will fail due to #629 --------- Signed-off-by: Lluís Revilla <[email protected]> Co-authored-by: Marcin <[email protected]>
This is failing on r-universe as well: |
It seems that R windows handles unicode characters differently. We should move the HTML element's id generation to an incremental one instead of named-based one. |
Confirmed with the help of @llrs-roche who also shared the post in R-Project blog about this. # Windows 🪟
id <- "\U41\U05E\U30\U5F\U7A\U1F4AA"
teal.slice:::sanitize_id(id)
#> [1] "h1724_A_0_z__"
pattern_escape <- "[^0-9A-Za-z_]"
id_new <- gsub(pattern_escape, "_", id)
id_new
#> [1] "A_0_z__" # linux 🐧
id <- "\U41\U05E\U30\U5F\U7A\U1F4AA"
teal.slice:::sanitize_id(id)
#> [1] "h1724_A_0_z_"
pattern_escape <- "[^0-9A-Za-z_]"
id_new <- gsub(pattern_escape, "_", id, perl = TRUE)
id_new
#> [1] "A_0_z_" |
This should be fixed by #632, closing. Confirmed that with: # Windows 🪟
id <- "\U41\U05E\U30\U5F\U7A\U1F4AA"
teal.slice:::sanitize_id(id)
#> [1] "h1724_A_0_z__"
pattern_escape <- "[^0-9A-Za-z_]"
id_new <- gsub(pattern_escape, "_", id, perl = TRUE) # Change compared above
id_new
#> [1] "A_0_z_" |
What happened?
While testing for #623 I found this issue:
I thought this could be related to my locale but I changed the
Sys.setlocale(locale = "C")
and it persisted.The code has changed recently (last month):
teal.slice/tests/testthat/test-utils.R
Lines 85 to 95 in a3d9a0f
sessionInfo()
Relevant log output
No response
Code of Conduct
Contribution Guidelines
Security Policy
The text was updated successfully, but these errors were encountered: