From 07aafc093a9f7f896fad1c6b742345ad38fc1fce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kirill=20M=C3=BCller?= Date: Sun, 17 Dec 2023 09:36:08 +0100 Subject: [PATCH 1/2] chore: Work around constructive problem --- tests/testthat/helper-dev.R | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/tests/testthat/helper-dev.R b/tests/testthat/helper-dev.R index 6ff09908e..3f1bf2cf3 100644 --- a/tests/testthat/helper-dev.R +++ b/tests/testthat/helper-dev.R @@ -59,12 +59,8 @@ inline_meta_tests <- function() { text <- trimws(format(cs$code), "right") text[[1]] <- paste0("spec_meta_bind <- ", text[[1]]) - # Hack - text <- gsub( - "bind_character_escape = ", - 'bind_character_escape = if (getRversion() >= "4.0") ', - text - ) + # FIXME: Why does constructive not handle this? + text <- gsub('r"[\\]"', '"\\\\"', text, fixed = TRUE) text <- c( "# Generated by helper-dev.R, do not edit by hand", "", From 1cceb89cca01f66511d1596fb86b295068edb3ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kirill=20M=C3=BCller?= Date: Sun, 17 Dec 2023 10:04:46 +0100 Subject: [PATCH 2/2] Not on CI --- tests/testthat/helper-dev.R | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/testthat/helper-dev.R b/tests/testthat/helper-dev.R index 3f1bf2cf3..422fc348d 100644 --- a/tests/testthat/helper-dev.R +++ b/tests/testthat/helper-dev.R @@ -1,4 +1,4 @@ -if (dir.exists("../../../RSQLite")) { +if (Sys.getenv("CI") == "" && dir.exists("../../../RSQLite")) { writeLines( c( "# Generated by helper-dev.R, do not edit by hand", @@ -81,7 +81,7 @@ times <- file.mtime(c( NULL )) -if (which.max(times) != 1) { +if (Sys.getenv("CI") == "" && which.max(times) != 1) { message("Generating spec-meta-bind.R") inline_meta_tests() }