Skip to content

Commit 22bf125

Browse files
committed
add test for glue strings in expect_named()
1 parent 81e4ee8 commit 22bf125

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

tests/testthat/test-expect-named.R

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,3 +48,13 @@ test_that("expect_named validates its inputs", {
4848
expect_named(c(a = 1), "a", ignore.case = "yes")
4949
})
5050
})
51+
52+
test_that("expect_named accepts glue for 'expected'", {
53+
n <- structure(
54+
c("v1", "v2", "v3", "v4", "v5"),
55+
class = c("glue", "character")
56+
)
57+
v <- set_names(1:5, n)
58+
59+
expect_named(v, n)
60+
})

0 commit comments

Comments
 (0)