@@ -4,7 +4,7 @@ test_that("use_cran_defaults() modifies and creates files correctly", {
4
4
path <- local_package(" testpkg" )
5
5
# capture setup messages
6
6
withr :: local_options(usethis.quiet = FALSE )
7
- expect_snapshot(use_extendr())
7
+ expect_snapshot(use_extendr(), transform = mask_any_version )
8
8
expect_snapshot(use_cran_defaults())
9
9
10
10
expect_snapshot(cat_file(" src" , " Makevars" ))
@@ -26,14 +26,6 @@ test_that("use_cran_defaults() quiet if quiet=TRUE", {
26
26
27
27
28
28
test_that(" vendor_pkgs() vendors dependencies" , {
29
- mask_version_strings <- function (snapshot_lines ) {
30
- stringi :: stri_replace_all_regex(
31
- snapshot_lines ,
32
- " \\ d+\\ .\\ d+\\ .\\ d+" ,
33
- " *.*.*"
34
- )
35
- }
36
-
37
29
skip_if_not_installed(" usethis" )
38
30
39
31
path <- local_package(" testpkg" )
@@ -44,6 +36,6 @@ test_that("vendor_pkgs() vendors dependencies", {
44
36
45
37
package_versions <- vendor_pkgs(path , quiet = TRUE )
46
38
expect_snapshot(cat_file(" src" , " rust" , " vendor-config.toml" ))
47
- expect_snapshot(package_versions , transform = mask_version_strings )
39
+ expect_snapshot(package_versions , transform = mask_any_version )
48
40
expect_true(file.exists(file.path(" src" , " rust" , " vendor.tar.xz" )))
49
41
})
0 commit comments