Skip to content

Commit ff3d0af

Browse files
committed
hash test
1 parent 960f293 commit ff3d0af

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

test/TestHash.m

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,24 @@ function test_extract(tc)
3030

3131
end
3232

33+
function test_sha256(tc)
34+
35+
r = fileparts(mfilename('fullpath'));
36+
fn = fullfile(r, "hello.tar.zst");
37+
38+
tc.verifyEqual(stdlib.sha256sum(fn), "36c1bbbdfd8d04ef546ffb15b9c0a65767fd1fe9a6135a257847e3a51fb1426c")
39+
40+
end
41+
42+
function test_md5sum(tc)
43+
44+
r = fileparts(mfilename('fullpath'));
45+
fn = fullfile(r, "hello.tar.zst");
46+
47+
tc.verifyEqual(stdlib.md5sum(fn), "d58cfb32e075781ba59082a8b18287f9")
48+
49+
end
50+
3351
end
3452

3553
end

0 commit comments

Comments
 (0)