diff --git a/tests/testthat/_snaps/glue.md b/tests/testthat/_snaps/glue.md index 748112b7a..e41896911 100644 --- a/tests/testthat/_snaps/glue.md +++ b/tests/testthat/_snaps/glue.md @@ -5,13 +5,33 @@ Message test_1: all good test_2: not #good + Code + cli::cli_dl(c(test_3 = "no' good either")) + Message + test_3: no' good either + Code + cli::cli_dl(c(test_4 = "no\" good also")) + Message + test_4: no" good also Code cli::cli_text("{.url https://example.com/#section}") Message + Code + cli::cli_alert_success("Qapla'") + Message + v Qapla' # quotes, etc. within expressions are still OK + Code + cli::cli_text("{.url URL} {x <- 'foo'; nchar(x)}") + Message + 3 + Code + cli::cli_text("{.url URL} {x <- \"foo\"; nchar(x)}") + Message + 3 Code cli::cli_text("{.url URL} {1 + 1 # + 1} {1 + 1}") Message diff --git a/tests/testthat/test-glue.R b/tests/testthat/test-glue.R index 56689db81..ec75dae8c 100644 --- a/tests/testthat/test-glue.R +++ b/tests/testthat/test-glue.R @@ -9,17 +9,17 @@ test_that("glue quotes and comments", { "test_2" = "not #good" ) ) -# cli::cli_dl(c("test_3" = "no' good either")) -# cli::cli_dl(c("test_4" = "no\" good also")) + cli::cli_dl(c("test_3" = "no' good either")) + cli::cli_dl(c("test_4" = "no\" good also")) cli::cli_text("{.url https://example.com/#section}") -# cli::cli_alert_success("Qapla'") + cli::cli_alert_success("Qapla'") }) }) test_that("quotes, etc. within expressions are still OK", { expect_snapshot({ -# cli::cli_text("{.url URL} {x <- 'foo'; nchar(x)}") -# cli::cli_text("{.url URL} {x <- \"foo\"; nchar(x)}") + cli::cli_text("{.url URL} {x <- 'foo'; nchar(x)}") + cli::cli_text("{.url URL} {x <- \"foo\"; nchar(x)}") cli::cli_text("{.url URL} {1 + 1 # + 1} {1 + 1}") }) })