Mercurial > octave
diff scripts/miscellaneous/run.m @ 28087:9cb04a9e81ec
rmdir: throw an error if operation fails and nargout == 0 (bug #57830).
* dirfns.cc (Frmdir): Change DEFMETHODX macro invocation to include nargout variable.
Check nargout, and for cases where "nargout == 0" and "status" indicates failure,
throw an error. For cases where "nargout > 0", return 3-value octave_value_list
in variable "retval".
* file-io.cc, gzip.cc, dir.m, isfolder.m, mkdir.m, run.m, tar.m,
unpack.m, zip.m, pathdef.m, savepath.m, configure_make.m, install.m,
uninstall.m, getpref.m, setpref.m, pkg.tst, publish.tst, system.tst:
Change calls from "rmdir" to "sts = rmdir" so that an error is not
unecessarily thrown in BIST tests and other clean up code.
author | Rik <rik@octave.org> |
---|---|
date | Mon, 17 Feb 2020 20:02:18 -0800 |
parents | bd51beb6205e |
children | d8318c12d903 |
line wrap: on
line diff
--- a/scripts/miscellaneous/run.m Mon Feb 17 20:02:10 2020 -0800 +++ b/scripts/miscellaneous/run.m Mon Feb 17 20:02:18 2020 -0800 @@ -114,7 +114,7 @@ %! assert (_5yVNhWVJWJn47RKnzxPsyb_, 1337); %! unwind_protect_cleanup %! unlink (test_script); -%! rmdir (tmp_dir); +%! sts = rmdir (tmp_dir); %! end_unwind_protect ## Test function file execution @@ -140,7 +140,7 @@ %! assert (tstval2, true); %! unwind_protect_cleanup %! unlink (test_function); -%! rmdir (tmp_dir); +%! sts = rmdir (tmp_dir); %! path (path_orig); %! end_unwind_protect