File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -5,13 +5,15 @@ test_that("stdout/stderr in parallel code", {
55 test_path(" test-parallel" , " stdout" ),
66 reporter = " summary"
77 )))
8- expect_true(" > test-stdout-2.R: This is a message!" %in% out )
9- expect_true(any(grepl(" test-stdout-3.R: [1] 1 2 3" , out , fixed = TRUE )))
8+ out <- paste(out , collapse = " \n " )
9+ expect_match(out , " > test-stdout-2.R: This is a message!" , fixed = TRUE )
10+ expect_match(out , " test-stdout-3.R: [1] 1 2 3" , fixed = TRUE )
1011
1112 out2 <- capture.output(suppressMessages(testthat :: test_local(
1213 test_path(" test-parallel" , " stdout" ),
1314 reporter = " progress"
1415 )))
15- expect_true(" > test-stdout-2.R: This is a message!" %in% out2 )
16- expect_true(any(grepl(" test-stdout-3.R: [1] 1 2 3" , out2 , fixed = TRUE )))
16+ out2 <- paste(out2 , collapse = " \n " )
17+ expect_match(out2 , " > test-stdout-2.R: This is a message!" , fixed = TRUE )
18+ expect_match(out2 , " test-stdout-3.R: [1] 1 2 3" , fixed = TRUE )
1719})
You can’t perform that action at this time.
0 commit comments