Skip to content

Commit

Permalink
Translation checks
Browse files Browse the repository at this point in the history
  • Loading branch information
markfairbanks committed Nov 10, 2022
1 parent 2819608 commit 5c80dc3
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tests/testthat/test-tidyeval-across.R
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,9 @@ test_that("across() output can be used as a data frame", {

expect_named(res, c("x", "y", "z", "across_df"))
expect_equal(res$across_df, c(4, 6, 8))

expr <- dt_squash(expr(across(c(x, y), ~ .x + 1)), df$env, df, is_top_across = FALSE)
expect_equal(expr, expr(data.table(x = x + 1, y = y + 1)))
})

test_that("pick() works", {
Expand All @@ -176,6 +179,9 @@ test_that("pick() works", {

expect_named(res, c("x", "y", "z", "row_sum"))
expect_equal(res$row_sum, c(2, 4, 6))

expr <- dt_squash(expr(pick(x, y)), df$env, df, is_top_across = FALSE)
expect_equal(expr, expr(data.table(x = x, y = y)))
})

# if_all ------------------------------------------------------------------
Expand Down

0 comments on commit 5c80dc3

Please sign in to comment.