diff --git a/DESCRIPTION b/DESCRIPTION
index bdf8e69f..4183da8b 100644
--- a/DESCRIPTION
+++ b/DESCRIPTION
@@ -1,6 +1,6 @@
Package: pkgcheck
Title: rOpenSci Package Checks
-Version: 0.1.1.012
+Version: 0.1.1.013
Authors@R: c(
person("Mark", "Padgham", , "mark.padgham@email.com", role = c("aut", "cre"),
comment = c(ORCID = "0000-0003-2172-5265")),
diff --git a/codemeta.json b/codemeta.json
index 805a4109..204938b5 100644
--- a/codemeta.json
+++ b/codemeta.json
@@ -8,7 +8,7 @@
"codeRepository": "https://github.com/ropensci-review-tools/pkgcheck",
"issueTracker": "https://github.com/ropensci-review-tools/pkgcheck/issues",
"license": "https://spdx.org/licenses/GPL-3.0",
- "version": "0.1.1.012",
+ "version": "0.1.1.013",
"programmingLanguage": {
"@type": "ComputerLanguage",
"name": "R",
diff --git a/tests/testthat/_snaps/pkgcheck/checks.html b/tests/testthat/_snaps/pkgcheck/checks.html
index 43597a7e..0771f812 100644
--- a/tests/testthat/_snaps/pkgcheck/checks.html
+++ b/tests/testthat/_snaps/pkgcheck/checks.html
@@ -172,11 +172,16 @@
2. Package Dependencies
NA |
+imports |
+memoise |
+NA |
+
+
suggests |
testthat |
NA |
-
+
linking_to |
Rcpp |
NA |
@@ -201,7 +206,7 @@ 3. Statistical Properties
1 authors
no vignette
no internal data file
-1 imported package
+2 imported packages
1 exported function (median 3 lines of code)
2 non-exported functions in R (median 3 lines of code)
2 R functions (median 5 lines of code)
diff --git a/tests/testthat/_snaps/pkgcheck/checks.md b/tests/testthat/_snaps/pkgcheck/checks.md
index 36733e54..0884e4ea 100644
--- a/tests/testthat/_snaps/pkgcheck/checks.md
+++ b/tests/testthat/_snaps/pkgcheck/checks.md
@@ -154,6 +154,7 @@ The table below tallies all function calls to all packages ('ncalls'), both inte
|type |package | ncalls|
|:----------|:--------|------:|
|imports |Rcpp | NA|
+|imports |memoise | NA|
|suggests |testthat | NA|
|linking_to |Rcpp | NA|
@@ -183,7 +184,7 @@ The package has:
- 1 authors
- no vignette
- no internal data file
-- 1 imported package
+- 2 imported packages
- 1 exported function (median 3 lines of code)
- 2 non-exported functions in R (median 3 lines of code)
- 2 R functions (median 5 lines of code)
diff --git a/tests/testthat/test-pkgcheck.R b/tests/testthat/test-pkgcheck.R
index 30ace370..63d0664d 100644
--- a/tests/testthat/test-pkgcheck.R
+++ b/tests/testthat/test-pkgcheck.R
@@ -1,4 +1,3 @@
-
test_that ("pkgcheck", {
withr::local_envvar (list ("PKGCHECK_SRR_REPORT_FILE" = "report.html"))
@@ -12,6 +11,25 @@ test_that ("pkgcheck", {
pkgname <- "testpkgchecknotapkg"
d <- srr::srr_stats_pkg_skeleton (pkg_name = pkgname)
+ # Add memoise to check global assign in memoised fns:
+ f_desc <- fs::path (d, "DESCRIPTION")
+ desc <- readLines (f_desc)
+ i <- grep ("Rcpp$", desc) [1]
+ desc <- c (
+ desc [seq_len (i - 1)],
+ " Rcpp,",
+ " memoise",
+ desc [seq (i + 1, length (desc))]
+ )
+ writeLines (desc, f_desc)
+ # Define memoised fn in new 'zzz.R' file:
+ f_zzz <- fs::path (d, "zzz.R")
+ zzz <- c (
+ ".onLoad <- function(libname, pkgname) {",
+ " test_fn <<- memoise::memoise(test_fn)",
+ "}"
+ )
+ writeLines (zzz, f_zzz)
x <- capture.output (
roxygen2::roxygenise (d),