File tree Expand file tree Collapse file tree 3 files changed +35
-0
lines changed
Expand file tree Collapse file tree 3 files changed +35
-0
lines changed Original file line number Diff line number Diff line change 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
You can’t perform that action at this time.
0 commit comments