-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update use_msrv to fix test and add optional overwrite argument
- Loading branch information
1 parent
23e2cb1
commit c6a91f0
Showing
4 changed files
with
74 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,18 @@ | ||
test_that("use_msrv() modifies the MSRV in the DESCRIPTION", { | ||
skip_if_not_installed("usethis") | ||
|
||
path <- withr::local_package("testpkg") | ||
path <- local_package("testpkg") | ||
|
||
# capture setup messages | ||
withr::local_options(usethis.quiet = FALSE) | ||
|
||
use_extendr(path, quiet = TRUE) | ||
use_msrv("1.70") | ||
use_msrv("1.70", path) | ||
|
||
expect_snapshot(cat(readLines("DESCRIPTION"), sep = "\n")) | ||
}) | ||
d <- desc::desc("DESCRIPTION") | ||
|
||
expect_identical( | ||
"Cargo (Rust's package manager), rustc >= 1.70", | ||
d$get_field("SystemRequirements") | ||
) | ||
}) |