Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
eutwt committed Dec 2, 2023
1 parent 2fa1892 commit 6b3e48d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
8 changes: 5 additions & 3 deletions R/tidyeval.R
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,11 @@ get_j <- function(dots) {
}

names(dots)[dot_is_data_frame_call] <- ""
dots[!dot_is_data_frame_call] <- lapply(dots[!dot_is_data_frame_call], function(x) {
call2('list', x)
})
dots[!dot_is_data_frame_call] <- lapply(
dots[!dot_is_data_frame_call],
call2,
.fn = "list"
)
j <- call2(".", !!!dots)
call2("unlist", j, recursive = FALSE)
}
Expand Down
4 changes: 2 additions & 2 deletions tests/testthat/test-step-subset-summarise.R
Original file line number Diff line number Diff line change
Expand Up @@ -170,14 +170,14 @@ test_that("data.frame()-ish calls get spliced - with grouped input", {
summarise(tibble::as_tibble_row(c(x = 1, y = 2)))
expect_identical(
collect(one_dot),
tibble(x = 1, y = 2)
tibble(a = 'a', x = 1, y = 2)
)

two_dots <- df %>%
summarise(tibble::as_tibble_row(c(x = 1, y = 2)), z = 3)
expect_identical(
collect(two_dots),
tibble(x = 1, y = 2, z = 3)
tibble(a = 'a', x = 1, y = 2, z = 3)
)

})
Expand Down

0 comments on commit 6b3e48d

Please sign in to comment.