From ab25fb9880c973adc584f67e64d28668ce3e3b89 Mon Sep 17 00:00:00 2001 From: Avraham Adler Date: Thu, 1 Feb 2024 15:02:18 -0500 Subject: [PATCH] Add test for package version and run it before the main test so as not to confuse the seed report. --- inst/tinytest/test_1version.R | 14 ++++++++++++++ inst/tinytest/{test_revss.R => test_2revss.R} | 0 2 files changed, 14 insertions(+) create mode 100644 inst/tinytest/test_1version.R rename inst/tinytest/{test_revss.R => test_2revss.R} (100%) diff --git a/inst/tinytest/test_1version.R b/inst/tinytest/test_1version.R new file mode 100644 index 0000000..5b540af --- /dev/null +++ b/inst/tinytest/test_1version.R @@ -0,0 +1,14 @@ +# Copyright Avraham Adler (c) 2023 +# SPDX-License-Identifier: MPL-2.0+ + +pV <- packageVersion("revss") + +# Test CITATION has most recent package version +expect_true(any(grepl(pV, toBibtex(citation("revss")), fixed = TRUE))) + +# Test NEWS has most recent package version +expect_true(any(grepl(pV, news(package = "revss"), fixed = TRUE))) + +# Test that NEWS has an entry with DESCRIPTION's Date +expect_true(any(grepl(packageDate("revss"), + news(package = "revss"), fixed = TRUE))) diff --git a/inst/tinytest/test_revss.R b/inst/tinytest/test_2revss.R similarity index 100% rename from inst/tinytest/test_revss.R rename to inst/tinytest/test_2revss.R