Skip to content

Commit ebe4997

Browse files
Merge pull request #1169 from r-lib/fix-test-io-warning
Suppress warning in test-io
2 parents 10efce2 + 4c2c0ab commit ebe4997

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

tests/testthat/test-io.R

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,10 @@ test_that("non-ASCII characters are handled properly for text styling", {
66

77

88
test_that("non-ASCII characters are handled properly for file styling", {
9-
skip_if(.Platform$OS.type != "windows")
10-
9+
# to avoid warnings
10+
# on unix: 'OS reports request to set locale to "English_United States.1252" cannot be honored'
11+
# on win: 'using locale code page other than 65001 ("UTF-8") may cause problems'
12+
withr::local_options(list(warn = -1L))
1113
withr::with_locale(
1214
c(LC_CTYPE = "English_United States.1252"),
1315
{

tests/testthat/tests-cache-require-serial.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ test_that("top-level test: Caches top-level expressions efficiently on style_tex
2525
partially_cached_benchmark["elapsed"] * 1.5,
2626
not_cached_benchmark["elapsed"]
2727
)
28-
expect_lt(full_cached_benchmark["elapsed"] * 30, benchmark["elapsed"])
28+
expect_lt(full_cached_benchmark["elapsed"] * 20, benchmark["elapsed"])
2929
})
3030

3131

0 commit comments

Comments
 (0)