Skip to content

Commit 960f293

Browse files
committed
test zstd
1 parent eed9e67 commit 960f293

File tree

3 files changed

+35
-0
lines changed

3 files changed

+35
-0
lines changed

test/TestHash.m

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
classdef TestHash < matlab.unittest.TestCase
2+
3+
methods(TestClassSetup)
4+
function setup_path(tc)
5+
import matlab.unittest.fixtures.PathFixture
6+
cwd = fileparts(mfilename("fullpath"));
7+
top = fullfile(cwd, "..");
8+
tc.applyFixture(PathFixture(top))
9+
end
10+
end
11+
12+
methods (Test)
13+
14+
function test_extract(tc)
15+
import matlab.unittest.constraints.IsFile
16+
import matlab.unittest.fixtures.TemporaryFolderFixture
17+
18+
fixture = tc.applyFixture(TemporaryFolderFixture);
19+
tmpDir = fixture.Folder;
20+
21+
r = fileparts(mfilename('fullpath'));
22+
fn = fullfile(r, "hello.tar.zst");
23+
24+
tc.assumeThat(fn, IsFile)
25+
26+
tc.assumeNotEmpty(stdlib.which("cmake"), "CMake not available")
27+
28+
stdlib.extract_zstd(fn, tmpDir)
29+
tc.verifyThat(fullfile(tmpDir, "test/hello.txt"), IsFile)
30+
31+
end
32+
33+
end
34+
35+
end

test/hello.tar.zst

121 Bytes
Binary file not shown.

test/hello.txt.zst

-24 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)