Skip to content

Commit

Permalink
tweak addLocalPackage test (#23)
Browse files Browse the repository at this point in the history
  • Loading branch information
achubaty committed Apr 1, 2017
1 parent 8cd07b0 commit 5300e33
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/testthat/test-4-updateRepo.R
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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)
)
Expand Down

0 comments on commit 5300e33

Please sign in to comment.