Skip to content

Commit

Permalink
Fix terminal dependent test case
Browse files Browse the repository at this point in the history
  • Loading branch information
gaborcsardi committed Jan 25, 2024
1 parent a35a3ea commit fcdb93b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/testthat/_snaps/local.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
Code
local_deps_tree(file.path(dld, "pkg4"))
Output
local::<tempdir>/<tempfile>
local::<tempdir>/<tempfile>/pkg4 1.0.0 [new][bld][dl] (unknown size)
\-pkg2 1.0.0 [new][bld][dl] (<size>)
\-pkg1 1.0.0 [new][bld][dl] (<size>)
Expand All @@ -28,7 +28,7 @@
Code
local_dev_deps_tree(file.path(dld, "pkg4"))
Output
local::<tempdir>/<tempfile>
local::<tempdir>/<tempfile>/pkg4 1.0.0 [new][bld][dl] (unknown size)
+-pkg2 1.0.0 [new][bld][dl] (<size>)
| \-pkg1 1.0.0 [new][bld][dl] (<size>)
\-pkg3 1.0.0 [new][bld][dl] (<size>)
Expand Down
3 changes: 3 additions & 0 deletions tests/testthat/test-local.R
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,9 @@ test_that("local_deps & co", {
utils::untar(pkg, exdir = dld)
expect_snapshot(local_deps(file.path(dld, "pkg4"))$package)
expect_snapshot(local_dev_deps(file.path(dld, "pkg4"))$package)

# otherwise long temp dir might be cut off
withr::local_options(cli.width = 500)
expect_snapshot(
local_deps_tree(file.path(dld, "pkg4")),
transform = function(x) transform_tempdir(transform_bytes(x))
Expand Down

0 comments on commit fcdb93b

Please sign in to comment.