From 5300e33d282a5a46b3cec6a0133e3c649169d3c2 Mon Sep 17 00:00:00 2001 From: Alex Chubaty Date: Fri, 31 Mar 2017 21:19:16 -0600 Subject: [PATCH] tweak addLocalPackage test (#23) --- tests/testthat/test-4-updateRepo.R | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/testthat/test-4-updateRepo.R b/tests/testthat/test-4-updateRepo.R index 171534d..52c95ac 100644 --- a/tests/testthat/test-4-updateRepo.R +++ b/tests/testthat/test-4-updateRepo.R @@ -86,7 +86,8 @@ for (pkg_type in names(types)) { skip_if_offline(revolution) tmpdir <- file.path(tempdir(), "miniCRAN", "local", pkg_type) - dir.create(tmpdir, recursive = TRUE); on.exit(unlink(tmpdir, recursive = TRUE)) + dir.create(tmpdir, recursive = TRUE) + on.exit(unlink(tmpdir, recursive = TRUE), add = TRUE) # get most recent version res <- download.packages(pkgsAddLocal, destdir = tmpdir, type = pkg_type, @@ -99,11 +100,10 @@ for (pkg_type in names(types)) { length(list.files(tmpdir)) == 2 ) - prefix <- miniCRAN:::repoPrefix(pkg_type, Rversion = rvers) - addLocalPackage(pkgs = pkgsAddLocal, pkgPath = tmpdir, path = repo_root, type = pkg_type, quiet = TRUE, Rversion = rvers) + prefix <- miniCRAN:::repoPrefix(pkg_type, Rversion = rvers) expect_true( miniCRAN:::.checkForRepoFiles(repo_root, pkgsAddLocal, prefix) )