Skip to content

Commit 6c830ad

Browse files
committed
test: suppress warning
1 parent 4f71ac9 commit 6c830ad

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
lines changed

+stdlib/file_checksum.m

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,9 @@
3737

3838
fid = fopen(file, 'r');
3939
if fid < 1
40-
warning(strcat("could not open ", file))
40+
warning("stdlib:file_checksum:ioerror", strcat("could not open ", file))
4141
return
4242
end
43-
disp(strcat("computing ", method, " hash of ", file))
4443

4544
while ~feof(fid)
4645
% https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/security/MessageDigest.html#update(byte)

test/TestHash.m

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@ function test_hash_text(tc, Ph)
3535

3636

3737
function test_hash_empty(tc, Pe)
38+
tc.applyFixture(matlab.unittest.fixtures.SuppressedWarningsFixture("stdlib:file_checksum:ioerror"))
39+
3840
tc.verifyEmpty(stdlib.file_checksum(Pe, "sha256"))
3941
end
4042

test/TestSymlink.m

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,8 @@ function test_read_symlink(tc)
5050

5151

5252
function test_create_symlink(tc)
53+
tc.applyFixture(matlab.unittest.fixtures.SuppressedWarningsFixture(["MATLAB:io:filesystem:symlink:TargetNotFound","MATLAB:io:filesystem:symlink:FileExists"]))
54+
5355
tc.verifyFalse(stdlib.create_symlink("", tempname()))
5456
tc.verifyFalse(stdlib.create_symlink(tc.target, tc.link), "should fail for existing symlink")
5557

0 commit comments

Comments
 (0)