Skip to content

Commit

Permalink
Rename and add "other package" tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
aadler committed May 16, 2024
1 parent 0e39759 commit 775a36f
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 10 deletions.
20 changes: 20 additions & 0 deletions inst/tinytest/test_package_metadata.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Copyright Avraham Adler (c) 2024
# SPDX-License-Identifier: MPL-2.0+

pV <- packageVersion("MBBEFDLite")
myOtherPkgs <- c("Delaporte", "lamW", "Pade", "revss", "minimaxApprox")


# Test CITATION has most recent package version
expect_true(any(grepl(pV, toBibtex(citation("MBBEFDLite")), fixed = TRUE)))

# Test NEWS has most recent package version
expect_true(any(grepl(pV, news(package = "MBBEFDLite"), fixed = TRUE)))

# Test that CITATION doesn't contain the name of any other of my packages
expect_false(any(sapply(myOtherPkgs, grepl,
x = toBibtex(citation("MBBEFDLite"), fixed = TRUE))))

# Test that NEWS doesn't contain the name of any other of my packages
expect_false(any(sapply(myOtherPkgs, grepl,
x = news(package = "MBBEFDLite"), fixed = TRUE)))
10 changes: 0 additions & 10 deletions inst/tinytest/test_version.R

This file was deleted.

0 comments on commit 775a36f

Please sign in to comment.