From 29402b4d94e0b9d7022739b627905e53daef8560 Mon Sep 17 00:00:00 2001 From: Teun van den Brand Date: Mon, 7 Oct 2024 13:20:20 +0200 Subject: [PATCH] add test --- tests/testthat/test-label-glue.R | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 tests/testthat/test-label-glue.R diff --git a/tests/testthat/test-label-glue.R b/tests/testthat/test-label-glue.R new file mode 100644 index 00000000..82701e4f --- /dev/null +++ b/tests/testthat/test-label-glue.R @@ -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")) + +})