Skip to content

Commit

Permalink
add test for collector-level na args
Browse files Browse the repository at this point in the history
  • Loading branch information
khusmann committed Jul 17, 2024
1 parent 4c0a3f1 commit ca143b4
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions tests/testthat/test-col-na.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
test_that("collector-level na overrides global na", {
test_vroom(
"a,b,c\na,foo,REFUSED\nb,REFUSED,NA\nOMITTED,bar,OMITTED\n",
col_types = cols(
a = col_character(na = "OMITTED"),
b = col_character(na = "REFUSED"),
c = col_character()
),
na = "NA",
equals = tibble::tibble(
a = c("a", "b", NA),
b = c("foo", NA, "bar"),
c = c("REFUSED", NA, "OMITTED"),
)
)
})

0 comments on commit ca143b4

Please sign in to comment.