We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f20460d commit 36d76f1Copy full SHA for 36d76f1
tests/testthat/test-csv.R
@@ -84,9 +84,12 @@ test_that("read_cmdstan_csv() fails if the file does not exist", {
84
test_that("read_cmdstan_csv() fails with empty csv file", {
85
file_path <- test_path("resources", "csv", "empty.csv")
86
file.create(file_path)
87
- expect_error(read_cmdstan_csv(file_path),
88
- "External command failed",
89
- fixed = TRUE)
+ error_msg <- if (utils::packageVersion("data.table") >= "1.18.0") {
+ "External command failed"
+ } else {
90
+ "Supplied CSV file is corrupt"
91
+ }
92
+ expect_error(read_cmdstan_csv(file_path), error_msg, fixed = TRUE)
93
file.remove(file_path)
94
})
95
0 commit comments