Skip to content

Commit 86d7bc0

Browse files
committed
Tweak hint
1 parent 6ca1ee7 commit 86d7bc0

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

R/expect-condition.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -597,7 +597,7 @@ check_condition_dots <- function(
597597
c(
598598
"Can't supply {.arg ...} unless {.arg regexp} is set.",
599599
"*" = "Unused arguments: {.arg {dot_names}}.",
600-
i = "{.arg ...} is passed to {.fn grepl} if and only if the {.arg regexp} argument is used."
600+
i = "Did you mean to use {.arg regexp} so {.arg ...} is passed to {.fn grepl}?"
601601
),
602602
call = error_call
603603
)

tests/testthat/_snaps/expect-condition.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,21 +37,21 @@
3737
Error in `expect_condition()`:
3838
! Can't supply `...` unless `regexp` is set.
3939
* Unused arguments: `foo`.
40-
i `...` is passed to `grepl()` if and only if the `regexp` argument is used.
40+
i Did you mean to use `regexp` so `...` is passed to `grepl()`?
4141
Code
4242
expect_condition(stop("Hi!"), , , "bar")
4343
Condition
4444
Error in `expect_condition()`:
4545
! Can't supply `...` unless `regexp` is set.
4646
* Unused arguments: `..1`.
47-
i `...` is passed to `grepl()` if and only if the `regexp` argument is used.
47+
i Did you mean to use `regexp` so `...` is passed to `grepl()`?
4848
Code
4949
expect_condition(stop("Hi!"), , , "bar", fixed = TRUE)
5050
Condition
5151
Error in `expect_condition()`:
5252
! Can't supply `...` unless `regexp` is set.
5353
* Unused arguments: `..1` and `fixed`.
54-
i `...` is passed to `grepl()` if and only if the `regexp` argument is used.
54+
i Did you mean to use `regexp` so `...` is passed to `grepl()`?
5555
Code
5656
expect_condition(stop("Hi!"), "x", foo = "bar")
5757
Condition
@@ -65,5 +65,5 @@
6565
Error in `expect_condition()`:
6666
! Can't supply `...` unless `regexp` is set.
6767
* Unused arguments: `pattern` and `fixed`.
68-
i `...` is passed to `grepl()` if and only if the `regexp` argument is used.
68+
i Did you mean to use `regexp` so `...` is passed to `grepl()`?
6969

0 commit comments

Comments
 (0)