Skip to content

Commit 188b8c9

Browse files
committed
is_mex_fun: validate args
1 parent a4e7e5d commit 188b8c9

File tree

3 files changed

+12
-27
lines changed

3 files changed

+12
-27
lines changed

+stdlib/is_mex_fun.m

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
11
%% IS_MEX_FUN detect if a function is loaded as MEX or plain .m
22

33
function y = is_mex_fun(name)
4-
y = endsWith(which(name), mexext());
4+
arguments
5+
name {mustBeTextScalar}
6+
end
7+
8+
y = endsWith(which(name), mexext());
9+
510
end
611

712
%!testif 0

+stdlib/windows_shortname.m

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,9 @@
3333

3434
end
3535

36-
%!testif 0
36+
%!test
37+
%! if ispc
38+
%! pkg load windows
39+
%! c = getenv('ProgramFiles');
40+
%! assert(strlength(windows_shortname(c)) == 11)
41+
%! endif

src/unlink.cpp

Lines changed: 0 additions & 25 deletions
This file was deleted.

0 commit comments

Comments
 (0)