Skip to content

Commit

Permalink
Merge pull request #327 from r-dbi/f-inline-bind
Browse files Browse the repository at this point in the history
chore: Work around constructive problem
  • Loading branch information
aviator-app[bot] authored Dec 17, 2023
2 parents 6f747e5 + 1cceb89 commit 9d8f046
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions tests/testthat/helper-dev.R
Original file line number Diff line number Diff line change
@@ -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",
Expand Down Expand Up @@ -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",
"",
Expand All @@ -85,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()
}

0 comments on commit 9d8f046

Please sign in to comment.