Skip to content

Commit

Permalink
install() and uninstall() gained argument 'file'
Browse files Browse the repository at this point in the history
  • Loading branch information
HenrikBengtsson committed May 9, 2024
1 parent d79c8db commit 3e7ada6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Package: startup
Version: 0.21.0-9006
Version: 0.21.0-9007
Title: Friendly R Startup Configuration
Depends: R (>= 2.14.0)
Suggests: commonmark, tools, tcltk
Expand Down
10 changes: 5 additions & 5 deletions tests/install.R
Original file line number Diff line number Diff line change
Expand Up @@ -12,34 +12,34 @@ res <- startup:::is_installed(file)
print(res)
stopifnot(!res)

print(startup:::install(path = path))
print(startup:::install(file))
res <- startup:::is_installed(file)
print(res)
stopifnot(res)

res <- tryCatch({
startup:::install(path = path, backup = FALSE)
startup:::install(file, backup = FALSE)
}, warning = identity)
print(res)
stopifnot(inherits(res, "warning"))

cat("# Empty\n", file = file)
print(startup:::install(path = path, backup = FALSE))
print(startup:::install(file, backup = FALSE))
res <- startup:::is_installed(file)
print(res)
stopifnot(res)


message("- uninstall() ...")

print(startup:::uninstall(path = path))
print(startup:::uninstall(file))

res <- startup:::is_installed(file)
print(res)
stopifnot(!res)

res <- tryCatch({
startup:::uninstall(path = path)
startup:::uninstall(file)
}, warning = identity)
print(res)
stopifnot(inherits(res, "warning"))
Expand Down

0 comments on commit 3e7ada6

Please sign in to comment.