Skip to content

Commit

Permalink
Merge pull request RcppCore#1245 from RcppCore/feature/silence_test
Browse files Browse the repository at this point in the history
Condition one test with stdout on verbose test var
  • Loading branch information
eddelbuettel authored Jan 29, 2023
2 parents f94ac43 + 54ee8fd commit 8d82ab9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
2023-01-29 Iñaki Ucar <iucar@fedoraproject.org>

* inst/tinytest/test_xptr.R: Fix a couple of tests writing to stdout

2023-01-24 Dirk Eddelbuettel <edd@debian.org>

* DESCRIPTION (Version, Date): Roll minor version
Expand Down
4 changes: 2 additions & 2 deletions inst/tinytest/test_xptr.R
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,9 @@ void test() {
'

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

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

writeLines(c("#define RCPP_USE_FINALIZE_ON_EXIT", code), file_path)
expect_stdout(system(cmd), info="check that finalizer is called on exit")
expect_equal(system(cmd, intern=TRUE), "custom_finalizer was called")

0 comments on commit 8d82ab9

Please sign in to comment.