From d78e2176ec12636721f6cf327af26be02d8c4295 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A1bor=20Cs=C3=A1rdi?= Date: Tue, 9 Apr 2024 14:51:10 +0200 Subject: [PATCH] Really fix tests on Windows --- tests/testthat/test-platforms.R | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/testthat/test-platforms.R b/tests/testthat/test-platforms.R index 9e4e5bd..40e37a7 100644 --- a/tests/testthat/test-platforms.R +++ b/tests/testthat/test-platforms.R @@ -8,8 +8,8 @@ test_that("get_platforms", { ) plt <- get_platforms() - plt[[1]] <- sub("\r\n", "\n", plt[[1]], fixed = TRUE) - plt[[2]] <- sub("\r\n", "\n", plt[[2]], fixed = TRUE) + plt[[1]] <- gsub("\r\n", "\n", plt[[1]], fixed = TRUE) + plt[[2]] <- gsub("\r\n", "\n", plt[[2]], fixed = TRUE) expect_snapshot({ cli::hash_obj_sha1(plt[[1]]) cli::hash_obj_sha1(plt[[2]]) @@ -138,4 +138,4 @@ test_that("select_platforms", { expect_snapshot(error = TRUE, { select_platforms() }) -}) \ No newline at end of file +})