From 37a20d67b7406a678056fde0f17c37b940607730 Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Wed, 26 Nov 2025 20:41:27 +0100 Subject: [PATCH] gnu: r-trycatchlog: Adjust for testthat compatibility. * gnu/packages/cran.scm (r-trycatchlog)[arguments]: Add phase 'testthat-compatibility. Change-Id: I4ce1676de6b07113aeb772163f698511b5d82bd9 --- gnu/packages/cran.scm | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/gnu/packages/cran.scm b/gnu/packages/cran.scm index 3ed541720083e69ab4b748c81122cf2510d337b3..4fe5ba32214a1bce2b3b4549b7c6b79e2113eea5 100644 --- a/gnu/packages/cran.scm +++ b/gnu/packages/cran.scm @@ -19888,6 +19888,26 @@ regions. Guaranteed to converge to local minimum of objective function.") (base32 "0k40a48qzwmardjnkf0h5s5zryivzvdanz61kxdqdfqlil19ma0d")))) (properties `((upstream-name . "tryCatchLog"))) (build-system r-build-system) + (arguments + (list + #:phases + '(modify-phases %standard-phases + (add-after 'unpack 'testthat-compatibility + (lambda _ + ;; These tests use the procedure "with_mock", which has been + ;; removed from testthat. + (substitute* "tests/testthat/test_build_log_output.R" + ((".*platform-specific newline works.*" m) + (string-append m "skip('skip');\n"))) + (substitute* "tests/testthat/test_is_windows.R" + ((".*conflict in Windows OS recognition throws a warning.*" m) + (string-append m "skip('skip');\n"))) + (substitute* "tests/testthat/test_namespace_hooks.R" + ((".*internal package state is initialized.*" m) + (string-append m "skip('skip');\n"))) + (substitute* "tests/testthat/test_platform_functions.R" + ((".*OS-specific newlines work.*" m) + (string-append m "skip('skip');\n")))))))) (native-inputs (list r-knitr r-testthat)) (home-page "https://github.com/aryoda/tryCatchLog") (synopsis "Advanced tryCatch and try functions")