Skip to content

Commit

Permalink
Drop advertisement
Browse files Browse the repository at this point in the history
  • Loading branch information
hadley committed Nov 22, 2023
1 parent 5ced947 commit 46aaa80
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 18 deletions.
32 changes: 15 additions & 17 deletions tests/testthat/_snaps/stdout-stderr.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,20 @@
# stdout is captured

Code
(reprex(system2("echo", args = "blah"), std_out_err = TRUE))
(reprex(system2("echo", args = "blah"), std_out_err = TRUE, advertise = FALSE))
Output
[1] "``` r"
[2] "system2(\"echo\", args = \"blah\")"
[3] "```"
[4] ""
[5] "<sup>Created on 2023-11-22 with [reprex v2.0.2.9000](https://reprex.tidyverse.org)</sup>"
[6] ""
[7] "<details style=\"margin-bottom:10px;\">"
[8] "<summary>"
[9] "Standard output and standard error"
[10] "</summary>"
[11] ""
[12] "``` sh"
[13] "blah"
[14] "```"
[15] ""
[16] "</details>"
[1] "``` r"
[2] "system2(\"echo\", args = \"blah\")"
[3] "```"
[4] ""
[5] "<details style=\"margin-bottom:10px;\">"
[6] "<summary>"
[7] "Standard output and standard error"
[8] "</summary>"
[9] ""
[10] "``` sh"
[11] "blah"
[12] "```"
[13] ""
[14] "</details>"

5 changes: 4 additions & 1 deletion tests/testthat/test-stdout-stderr.R
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
test_that("stdout is captured", {
skip_on_cran()
expect_snapshot((reprex(system2("echo", args = "blah"), std_out_err = TRUE)))

expect_snapshot(
(reprex(system2("echo", args = "blah"), std_out_err = TRUE, advertise = FALSE))
)
})

test_that("stdout placeholder appears if nothing is captured", {
Expand Down

0 comments on commit 46aaa80

Please sign in to comment.