Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions tests/testthat/test-csv.R
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,12 @@ test_that("read_cmdstan_csv() fails if the file does not exist", {
test_that("read_cmdstan_csv() fails with empty csv file", {
file_path <- test_path("resources", "csv", "empty.csv")
file.create(file_path)
expect_error(read_cmdstan_csv(file_path),
"Supplied CSV file is corrupt!")
error_msg <- if (utils::packageVersion("data.table") >= "1.18.0") {
"External command failed"
} else {
"Supplied CSV file is corrupt"
}
expect_error(read_cmdstan_csv(file_path), error_msg, fixed = TRUE)
file.remove(file_path)
})

Expand Down
Loading