Skip to content

Commit 54ee8fd

Browse files
committed
fix a couple of tests by actually capturing stdout
1 parent 48d819c commit 54ee8fd

File tree

2 files changed

+5
-8
lines changed

2 files changed

+5
-8
lines changed

ChangeLog

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
1-
2023-01-29 Dirk Eddelbuettel <edd@debian.org>
1+
2023-01-29 Iñaki Ucar <iucar@fedoraproject.org>
22

3-
* inst/tinytest/test_xptr.R: Condition one test writing to stdout
4-
on test verbosity environment variable being set
3+
* inst/tinytest/test_xptr.R: Fix a couple of tests writing to stdout
54

65
2023-01-24 Dirk Eddelbuettel <[email protected]>
76

inst/tinytest/test_xptr.R

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -60,11 +60,9 @@ void test() {
6060
'
6161

6262
writeLines(code, file_path)
63-
expect_silent(system(cmd), info="check that finalizer is NOT called on exit")
63+
expect_equal(system(cmd, intern=TRUE), character(0))
6464

6565
if (packageVersion("tinytest") < "1.2.0") exit_file("Skip remainder on older test platform")
6666

67-
if (Sys.getenv("RunVerboseRcppTests") == "yes") {
68-
writeLines(c("#define RCPP_USE_FINALIZE_ON_EXIT", code), file_path)
69-
expect_stdout(system(cmd), info="check that finalizer is called on exit")
70-
}
67+
writeLines(c("#define RCPP_USE_FINALIZE_ON_EXIT", code), file_path)
68+
expect_equal(system(cmd, intern=TRUE), "custom_finalizer was called")

0 commit comments

Comments
 (0)