Skip to content

Commit

Permalink
add .trim test
Browse files Browse the repository at this point in the history
  • Loading branch information
Edgar-Zamora committed Aug 15, 2024
1 parent 66a4f46 commit 8371128
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tests/testthat/test-glue.R
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,9 @@ test_that("verify wrapper is functional", {
expect_equal(as.character(str_glue_data(df, "a {b}", b = "b")), "a b")
})

test_that("verify trim is functional", {
expect_equal(as.character(str_glue("L1\t \n \tL2")), "L1\t \nL2")

expect_equal(as.character(str_glue("L1\t \n \tL2", .trim = FALSE)), "L1\t \n \tL2")

})

0 comments on commit 8371128

Please sign in to comment.