Skip to content

Commit

Permalink
Add test for pmap()
Browse files Browse the repository at this point in the history
  • Loading branch information
lionel- committed Aug 5, 2020
1 parent 7abe7af commit cd206b1
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion tests/testthat/test-map2.R
Expand Up @@ -60,9 +60,13 @@ test_that("map2() with empty input copies names", {
expect_identical(map2_raw(named_list, list(), identity), named(raw()))
})

test_that("map2() recycle names (#779)", {
test_that("map2() and pmap() recycle names (#779)", {
expect_identical(
map2(c(a = 1), 1:2, ~ .x),
list(a = 1, a = 1)
)
expect_identical(
pmap(list(c(a = 1), 1:2), ~ .x),
list(a = 1, a = 1)
)
})

0 comments on commit cd206b1

Please sign in to comment.