Skip to content

Commit 0feafcb

Browse files
committed
And test
1 parent 1516212 commit 0feafcb

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

β€Žtests/testthat/_snaps/expect-match.mdβ€Ž

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,14 @@
149149
Actual text:
150150
x | test
151151

152+
# show_text() shows success and failure
153+
154+
Code
155+
base::writeLines(show_text(c("a", "b"), c(TRUE, FALSE)))
156+
Output
157+
βœ” β”‚ a
158+
βœ– β”‚ b
159+
152160
# show_text() truncates values and lines
153161

154162
Code

β€Žtests/testthat/test-expect-match.Rβ€Ž

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,13 @@ test_that("empty string is never a match", {
6969

7070
# show_text() ------------------------------------------------------------------
7171

72+
test_that("show_text() shows success and failure", {
73+
local_reproducible_output(unicode = TRUE)
74+
expect_snapshot({
75+
base::writeLines(show_text(c("a", "b"), c(TRUE, FALSE)))
76+
})
77+
})
78+
7279
test_that("show_text() truncates values and lines", {
7380
local_reproducible_output(unicode = TRUE)
7481
lines <- map_chr(

0 commit comments

Comments
Β (0)