tests/testthat/_snaps/types.md

is_string2() matches on empty

Code
  (expect_error(is_string2("foo", empty = 1)))
Output
  <error/rlang_error>
  Error in `is_string2()`:
  ! `empty` must be `NULL` or a logical value.
Code
  (expect_error(is_string2("foo", empty = NA)))
Output
  <error/rlang_error>
  Error in `is_string2()`:
  ! `empty` must be `NULL` or a logical value.
Code
  (expect_error(is_string2("foo", "foo", empty = TRUE)))
Output
  <error/rlang_error>
  Error in `is_string2()`:
  ! Exactly one of `string` and `empty` must be supplied.


Try the rlang package in your browser

Any scripts or data that you put into this service are public.

rlang documentation built on June 22, 2024, 9:31 a.m.