Skip to content

Commit dd04b95

Browse files
committed
Check that the string with a single quote is robustly
passed to R (both value and dict key)
1 parent 38315dd commit dd04b95

File tree

1 file changed

+4
-0
lines changed
  • tests/test_script/scripts

1 file changed

+4
-0
lines changed

tests/test_script/scripts/test.R

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,5 +42,9 @@ if (snakemake@config[["test"]] != TRUE) {
4242
stop("Error evaluating config.")
4343
}
4444

45+
if (snakemake@config[["foo\' bar"]] != "let\'s go") {
46+
stop("Error with the key/value containing single quotes.")
47+
}
48+
4549
values <- scan(snakemake@input[[1]])
4650
write(values, file = snakemake@output[["txt"]])

0 commit comments

Comments
 (0)