git: 951e7b2967ca - main - devel/R-cran-testthat: Fix some tests

From: Nuno Teixeira <eduardo_at_FreeBSD.org>
Date: Thu, 04 Sep 2025 21:05:48 UTC
The branch main has been updated by eduardo:

URL: https://cgit.FreeBSD.org/ports/commit/?id=951e7b2967ca02b87a9b43cabc1097f0b38de482

commit 951e7b2967ca02b87a9b43cabc1097f0b38de482
Author:     Nuno Teixeira <eduardo@FreeBSD.org>
AuthorDate: 2025-09-04 21:03:01 +0000
Commit:     Nuno Teixeira <eduardo@FreeBSD.org>
CommitDate: 2025-09-04 21:03:01 +0000

    devel/R-cran-testthat: Fix some tests
    
    Use a custom test target to fix "`expect_snapshot()` requires the 3rd edition."
    Waiting for next release to have tests fully fixed.
---
 devel/R-cran-testthat/Makefile | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/devel/R-cran-testthat/Makefile b/devel/R-cran-testthat/Makefile
index b58fca631c12..8dfec3fb83d4 100644
--- a/devel/R-cran-testthat/Makefile
+++ b/devel/R-cran-testthat/Makefile
@@ -31,8 +31,11 @@ RUN_DEPENDS=	R-cran-brio>=1.1.3:devel/R-cran-brio \
 
 USES=		cran:auto-plist,compiles
 
-TESTING_UNSAFE=	Error in `edition_require(3, "expect_snapshot()")`: `expect_snapshot()` requires the 3rd edition. \
-		https://github.com/r-lib/testthat/issues/1924 \
-		https://github.com/r-lib/testthat/issues/1347
+TESTING_UNSAFE=	https://github.com/r-lib/testthat/issues/2214
+
+do-test:
+	@${FIND} ${WRKSRC} \( -name '*.o' -o -name '*.so' \) -delete
+	@cd ${WRKDIR} ; ${SETENV} ${MAKE_ENV} _R_CHECK_FORCE_SUGGESTS_=FALSE \
+	${LOCALBASE}/bin/R CMD check --no-manual ${PORTNAME}
 
 .include <bsd.port.mk>