diff --git a/tests/testthat/test-col-na.R b/tests/testthat/test-col-na.R index 83c0814d..c365606f 100644 --- a/tests/testthat/test-col-na.R +++ b/tests/testthat/test-col-na.R @@ -14,3 +14,20 @@ test_that("collector-level na overrides global na", { ) ) }) + +test_that("collector-level na works with col_guess", { + test_vroom( + "a,b,c\n1,1.1,REFUSED\n2,REFUSED,NA\nOMITTED,2.2,OMITTED\n", + col_types = cols( + a = col_guess(na = "OMITTED"), + b = col_guess(na = "REFUSED"), + c = col_guess(), + ), + na = "NA", + equals = tibble::tibble( + a = c(1, 2, NA), + b = c(1.1, NA, 2.2), + c = c("REFUSED", NA, "OMITTED"), + ) + ) +})