diff --git a/DESCRIPTION b/DESCRIPTION index a11d038b5..0f17a960d 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -27,7 +27,7 @@ Imports: lifecycle (>= 1.0.3), magrittr, purrr (>= 1.0.1), - rlang (>= 1.0.4), + rlang (>= 1.1.1), stringr (>= 1.5.0), tibble (>= 2.1.1), tidyselect (>= 1.2.0), diff --git a/R/separate-wider.R b/R/separate-wider.R index d546fcf1c..b40cb45ba 100644 --- a/R/separate-wider.R +++ b/R/separate-wider.R @@ -271,6 +271,7 @@ separate_wider_position <- function( check_installed("stringr") check_data_frame(data) check_required(cols) + check_required(widths) if (!is_integerish(widths) || !any(have_name(widths))) { cli::cli_abort("{.arg widths} must be a (partially) named integer vector.") } diff --git a/tests/testthat/_snaps/append.md b/tests/testthat/_snaps/append.md index ef74ae9a3..c41737a6b 100644 --- a/tests/testthat/_snaps/append.md +++ b/tests/testthat/_snaps/append.md @@ -7,5 +7,5 @@ Error in `df_append()`: ! `after` must be a whole number, not the number 1.5. i This is an internal error that was detected in the tidyr package. - Please report it at with a reprex () and the full backtrace. + Please report it at with a reprex () and the full backtrace. diff --git a/tests/testthat/_snaps/hoist.md b/tests/testthat/_snaps/hoist.md index 4bc7dbc5c..3291a2d91 100644 --- a/tests/testthat/_snaps/hoist.md +++ b/tests/testthat/_snaps/hoist.md @@ -23,7 +23,7 @@ Output Error in `hoist()`: - ! `.data[[.col]]` must be a list, not a number. + ! `.data[[.col]]` must be a list, not the number 1. Code (expect_error(df %>% hoist(x, 1))) Output diff --git a/tests/testthat/_snaps/pivot-long.md b/tests/testthat/_snaps/pivot-long.md index 1e8f83c9f..477545174 100644 --- a/tests/testthat/_snaps/pivot-long.md +++ b/tests/testthat/_snaps/pivot-long.md @@ -189,6 +189,7 @@ ! Arguments in `...` must be used. x Problematic argument: * ..1 = 1 + i Did you misspell an argument name? Code (expect_error(pivot_longer(df, c(x, y), col_vary = "slowest"))) Output @@ -197,6 +198,7 @@ ! Arguments in `...` must be used. x Problematic argument: * col_vary = "slowest" + i Did you misspell an argument name? # `build_longer_spec()` requires empty dots diff --git a/tests/testthat/_snaps/separate-wider.md b/tests/testthat/_snaps/separate-wider.md index eddd11f66..71b04a895 100644 --- a/tests/testthat/_snaps/separate-wider.md +++ b/tests/testthat/_snaps/separate-wider.md @@ -97,8 +97,8 @@ Code df %>% separate_wider_position(x) Condition - Error in `is_integerish()`: - ! argument "widths" is missing, with no default + Error in `separate_wider_position()`: + ! `widths` is absent but must be supplied. Code df %>% separate_wider_position(x, widths = 1.5) Condition diff --git a/tests/testthat/_snaps/unnest-helper.md b/tests/testthat/_snaps/unnest-helper.md index 578ec0c35..578f23846 100644 --- a/tests/testthat/_snaps/unnest-helper.md +++ b/tests/testthat/_snaps/unnest-helper.md @@ -71,7 +71,7 @@ Output Error: - ! Can't convert `transform$x`, a number, to a function. + ! Can't convert `transform$x`, a double vector, to a function. Code (expect_error(df_simplify(data.frame(), transform = list(x = 1, x = 1)))) Output