Skip to content

Commit e94d4c1

Browse files
committed
test: which: check assumptions
1 parent 4260434 commit e94d4c1

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

+stdlib/which.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
return
2828
end
2929

30-
% relative directory component, but path was not a file
30+
% relative directory component, but path was not an executable file
3131
if ~strcmp(stdlib.filename(cmd), cmd)
3232
return
3333
end

test/TestWhich.m

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,9 @@ function test_which_absolute(tc, mexe)
3939
end
4040

4141
tc.assumeThat(r, matlab.unittest.constraints.IsFile)
42+
tc.assumeTrue(stdlib.is_exe(r))
4243

44+
tc.verifyEqual(stdlib.which(r), r)
4345
tc.verifyEqual(stdlib.which(mexe), r)
4446

4547
end

0 commit comments

Comments
 (0)