Skip to content

Commit

Permalink
Add test case
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisfacer committed Dec 12, 2022
1 parent 8a5eafb commit d4818a5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
Binary file added inst/testdata/bad.haven.text.rds
Binary file not shown.
5 changes: 5 additions & 0 deletions tests/testthat/test-mergedatasetsbycase.R
Original file line number Diff line number Diff line change
Expand Up @@ -1265,5 +1265,10 @@ test_that("DS-4002: works when file extension in upper case", {
match.by.variable.labels = FALSE), NA)
})

test_that("DS-4045 Don't fail on converting haven labeled text to date", {
bad.variable <- load(findInstDirFile("bad.haven.text.rds"))
expect_error(isParsableAsDateTime(bad.variable), NA)
})

if (file.exists("Combined data set.sav"))
file.remove("Combined data set.sav")

0 comments on commit d4818a5

Please sign in to comment.