Skip to content

Commit 1039762

Browse files
committed
Fix a test snapshot
1 parent ba1357e commit 1039762

File tree

2 files changed

+15
-1
lines changed

2 files changed

+15
-1
lines changed
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# get_untar_decompress_arg
2+
3+
Code
4+
get_untar_decompress_arg(zip)
5+
Condition
6+
Error:
7+
! '<path>/xxx.zip' is not a tar file, it looks like a zip file
8+

tests/testthat/test-install-tar.R

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,13 @@ test_that("get_untar_decompress_arg", {
5252
})
5353

5454
zip <- system.file(package = "pkgdepends", "tools", "xxx.zip")
55-
expect_snapshot(error = TRUE, get_untar_decompress_arg(zip))
55+
expect_snapshot(
56+
error = TRUE,
57+
get_untar_decompress_arg(zip),
58+
transform = function(x) {
59+
sub("'.*xxx[.]zip'", "'<path>/xxx.zip'", x)
60+
}
61+
)
5662
})
5763

5864
test_that("eup_get_args", {

0 commit comments

Comments
 (0)