Skip to content

Commit

Permalink
Add tests for copy_symlinks for tree_hash
Browse files Browse the repository at this point in the history
  • Loading branch information
mkitti committed Jan 8, 2024
1 parent 25aa8ea commit 6360340
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 6360340

Please sign in to comment.