Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
pascal-sauer committed Jan 24, 2024
1 parent 3cd68c3 commit 021b66c
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion tests/testthat/test-localRedirect.R
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,13 @@ test_that("scope for localRedirect can be set", {
localRedirect("tau", target = "tau2")
expect_identical(getConfig("redirections"), list(tau = normalizePath("tau2")))
}
f()
f1()
expect_identical(getConfig("redirections"), list())

f2 <- function() {
localRedirect("tau", target = "tau2", .local = FALSE)
expect_identical(getConfig("redirections"), list(tau = normalizePath("tau2")))
}
f2()
expect_identical(getConfig("redirections"), list(tau = normalizePath("tau2")))
})

0 comments on commit 021b66c

Please sign in to comment.