From 9ca8c481a653a62daf5e2d479cd3f7a4fe1c1e92 Mon Sep 17 00:00:00 2001 From: simonpcouch Date: Thu, 31 Oct 2024 16:48:02 -0500 Subject: [PATCH] proofread error message --- R/backend-.R | 8 ++++---- tests/testthat/_snaps/backend-.md | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/R/backend-.R b/R/backend-.R index 2e6111b81..3ce0b50a4 100644 --- a/R/backend-.R +++ b/R/backend-.R @@ -280,13 +280,13 @@ base_scalar <- sql_translator( str_trim = sql_str_trim, str_c = sql_paste(""), str_sub = sql_str_sub("SUBSTR"), - # https://docs.getdbt.com/sql-reference/like is typically case sensitive + # https://docs.getdbt.com/sql-reference/like is typically case sensitive (#1490) str_like = function(string, pattern, ignore_case = FALSE) { if (isTRUE(ignore_case)) { cli_abort(c( - "Backend does not support case insensitve {.fn str_like}.", - i = "Set ignore_case = FALSE for case sensitive match.", - i = "Or use `tolower()` on both arguments to achieve a case insensitive match." + "Backend does not support case insensitive {.fn str_like}.", + i = "Set {.code ignore_case = FALSE} for case sensitive match.", + i = "Use {.fn tolower} on both arguments to achieve a case insensitive match." )) } else { sql_expr(!!string %LIKE% !!pattern) diff --git a/tests/testthat/_snaps/backend-.md b/tests/testthat/_snaps/backend-.md index dadcfcd27..3760aa7ae 100644 --- a/tests/testthat/_snaps/backend-.md +++ b/tests/testthat/_snaps/backend-.md @@ -53,9 +53,9 @@ test_translate_sql(str_like(x, "abc", ignore_case = TRUE)) Condition Error in `str_like()`: - ! Backend does not support case insensitve `str_like()`. - i Set ignore_case = FALSE for case sensitive match. - i Or use `tolower()` on both arguments to achieve a case insensitive match. + ! Backend does not support case insensitive `str_like()`. + i Set `ignore_case = FALSE` for case sensitive match. + i Use `tolower()` on both arguments to achieve a case insensitive match. # default raw escapes translated correctly