Skip to content

Commit

Permalink
add test
Browse files Browse the repository at this point in the history
  • Loading branch information
teunbrand committed Oct 7, 2024
1 parent df2a36c commit 29402b4
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions tests/testthat/test-label-glue.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
test_that("label_glue environments work out as intended", {

x <- LETTERS[1:3]
y <- "foo"

# Note `{x}` should mask the `x <- LETTERS[1:3]` above
f <- label_glue("{x} and {y}")
expect_equal(f(letters[1:3]), c("a and foo", "b and foo", "c and foo"))

})

0 comments on commit 29402b4

Please sign in to comment.