-
Notifications
You must be signed in to change notification settings - Fork 79
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Translating double quotes to backticks for BigQuery. Part of #341
- Loading branch information
Admin_mschuemi
authored and
Admin_mschuemi
committed
Sep 6, 2023
1 parent
71e2d9d
commit b7339ce
Showing
5 changed files
with
11 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,7 +25,6 @@ Suggests: | |
testthat, | ||
knitr, | ||
rmarkdown, | ||
stringr, | ||
shiny, | ||
shinydashboard | ||
RoxygenNote: 7.2.3 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
test_that("replacementPatterns.csv has valid format", { | ||
lines <- readLines(system.file("csv", "replacementPatterns.csv", package = "SqlRender")) | ||
for (line in lines) { | ||
line_trim <- stringr::str_replace_all(line, '".[^"]+"', "") | ||
comma_cnt <- stringr::str_count(line_trim, ",") | ||
lineTrim <- gsub('"[^"]*"', "", gsub('\\\\"', "", line)) | ||
comma_cnt <- nchar(lineTrim) - nchar(gsub(",", "", lineTrim)) | ||
expect_equal(comma_cnt, 2, label = paste0("comma counts in string: ", line)) | ||
} | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters