Skip to content

Commit

Permalink
Updating install asreml and tests
Browse files Browse the repository at this point in the history
  • Loading branch information
rogerssam committed Jul 10, 2024
1 parent 46e9033 commit 1eae425
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions R/install_asreml.R
Original file line number Diff line number Diff line change
Expand Up @@ -281,11 +281,11 @@ manage_file <- function(save_file, keep_file, filename) {
}

# If keep_file is FALSE, remove file
if(!keep_file) {
if(isFALSE(keep_file)) {
unlink(save_file)
result <- TRUE
}
else if(keep_file) {
else if(isTRUE(keep_file)) {
# If keep_file is true, copy asreml to current directory
result <- tryCatch(
expr = {
Expand Down
3 changes: 2 additions & 1 deletion tests/testthat/test-zzz_install_asreml.R
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ test_that("Prints message if asreml already installed", {
skip_on_cran()
skip_on_ci()
install_asreml(quiet = TRUE)
expect_message(install_asreml(), "ASReml-R is already installed.")
expect_message(install_asreml(),
"The latest version of ASReml-R available for your sysetm is already installed\\. To install anyway, set `force = TRUE`\\.")
})

test_that("Quiet returns no output", {
Expand Down

0 comments on commit 1eae425

Please sign in to comment.