Skip to content

Commit

Permalink
Add iso_codes.v4.11.0.any.tar.gz as test data for tree_hash
Browse files Browse the repository at this point in the history
  • Loading branch information
mkitti committed Jan 8, 2024
1 parent 6360340 commit 198e4bb
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
SimpleBufferStream = "777ac1f9-54b0-4bf8-805c-2214025038e7"
Tar_jll = "9b64493d-8859-5bf3-93d7-7c32dd38186f"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
CodecZlib = "944b1d66-785c-5afd-91f1-9de20f533193"

[targets]
test = ["Random", "SimpleBufferStream", "Tar_jll", "Test"]
test = ["Random", "SimpleBufferStream", "Tar_jll", "Test", "CodecZlib"]
Binary file added test/data/iso_codes.v4.11.0.any.tar.gz
Binary file not shown.
8 changes: 8 additions & 0 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,14 @@ end
@arg_test tar @test empty_tree_sha256 ==
Tar.tree_hash(hdr->false, tar, algorithm="git-sha256", copy_symlinks=true)
end
NON_STDLIB_TESTS && begin
open(GzipDecompressorStream, "data/iso_codes.v4.11.0.any.tar.gz") do io
@test Tar.tree_hash(io) == "71f68a3d55d73f2e15a3969c241fae2349b1feb5"
end
open(GzipDecompressorStream, "data/iso_codes.v4.11.0.any.tar.gz") do io
@test Tar.tree_hash(io; copy_symlinks=true) == "409d6ac4c02dae43ff4fe576b5c5820d0386fb3f"
end
end
end
@testset "Tar.list & check properties" begin
headers = Tar.list(tarball)
Expand Down
1 change: 1 addition & 0 deletions test/setup.jl
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ const NON_STDLIB_TESTS = Main == @__MODULE__

if NON_STDLIB_TESTS
using SimpleBufferStream
using CodecZlib

using Tar_jll
if isdefined(Tar_jll, :tar)
Expand Down

0 comments on commit 198e4bb

Please sign in to comment.