Skip to content

Commit

Permalink
snapshot test
Browse files Browse the repository at this point in the history
  • Loading branch information
edward-burn committed Apr 4, 2024
1 parent d22e8e9 commit e4da507
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 3 additions & 1 deletion tests/testthat/_snaps/backend-.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,9 @@
test_translate_sql(str_like(x, "abc", ignore_case = TRUE))
Condition
Error in `str_like()`:
! Backend only supports case insensitve `str_like()`.
! Backend does not support case insensitve {.fn str_like}.
i Set ignore_case = FALSE for case sensitive match.
i Note, using `tolower()` to cast string and pattern to lower case would also achieve a case insenitive match.

# default raw escapes translated correctly

Expand Down
4 changes: 2 additions & 2 deletions tests/testthat/test-backend-.R
Original file line number Diff line number Diff line change
Expand Up @@ -103,9 +103,9 @@ test_that("lead and lag translate n to integers", {

test_that("can translate case insensitive like", {
local_con(simulate_dbi())
test_translate_sql(str_like(x, "abc"))
test_translate_sql(str_like(x, "abc", ignore_case = FALSE))
expect_snapshot(
test_translate_sql(str_like(x, "abc", ignore_case = FALSE)),
test_translate_sql(str_like(x, "abc", ignore_case = TRUE)),
error = TRUE
)
})
Expand Down

0 comments on commit e4da507

Please sign in to comment.