Skip to content

Commit

Permalink
Add a test
Browse files Browse the repository at this point in the history
  • Loading branch information
jennybc committed Sep 21, 2023
1 parent 958fe85 commit ff3fc45
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tests/testthat/test-glue.R
Original file line number Diff line number Diff line change
Expand Up @@ -519,6 +519,10 @@ test_that("`+` method does not interpolate twice", {
expect_identical(glue("{x}", x = "{wut}") + "y", as_glue("{wut}y"))
})

test_that("`+` method returns length-0 for a length-0 input", {
expect_identical(as_glue("hello") + "world"[0], character())
})

test_that("+ method requires character vectors", {
expect_snapshot(error = TRUE, {
as_glue("a") + 1
Expand Down

0 comments on commit ff3fc45

Please sign in to comment.