From 6360340f89afae0d46d37d398b2e4c1638ba1e34 Mon Sep 17 00:00:00 2001 From: Mark Kittisopikul Date: Mon, 8 Jan 2024 05:25:37 -0500 Subject: [PATCH] Add tests for `copy_symlinks` for tree_hash --- test/runtests.jl | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/test/runtests.jl b/test/runtests.jl index 2212b0e..dc2b9b1 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -83,11 +83,17 @@ end @testset "Tar.tree_hash" begin arg_readers(tarball) do tar @arg_test tar @test Tar.tree_hash(tar) == hash + @arg_test tar @test Tar.tree_hash(tar; copy_symlinks=true) != hash @arg_test tar @test empty_tree_sha1 == Tar.tree_hash(hdr->false, tar) + @arg_test tar @test empty_tree_sha1 == Tar.tree_hash(hdr->false, tar; copy_symlinks=true) @arg_test tar @test empty_tree_sha1 == Tar.tree_hash(hdr->false, tar, algorithm="git-sha1") + @arg_test tar @test empty_tree_sha1 == + Tar.tree_hash(hdr->false, tar, algorithm="git-sha1", copy_symlinks=true) @arg_test tar @test empty_tree_sha256 == Tar.tree_hash(hdr->false, tar, algorithm="git-sha256") + @arg_test tar @test empty_tree_sha256 == + Tar.tree_hash(hdr->false, tar, algorithm="git-sha256", copy_symlinks=true) end end @testset "Tar.list & check properties" begin