Mercurial > octave
changeset 33285:aacbcf3cbc6a stable
is_valid_file_id.m: Add BIST test for bug #65543 (bug #65543)
* is_valid_file_id.m: Add BIST test for tmpfile() FID being valid.
Add BIST test for input validation when called with no inputs.
author | Rik <rik@octave.org> |
---|---|
date | Mon, 01 Apr 2024 10:19:03 -0700 |
parents | 2aea823a9973 |
children | b7702e35cbef 91f7c8246a98 |
files | scripts/io/is_valid_file_id.m |
diffstat | 1 files changed, 11 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/scripts/io/is_valid_file_id.m Mon Apr 01 12:54:20 2024 -0400 +++ b/scripts/io/is_valid_file_id.m Mon Apr 01 10:19:03 2024 -0700 @@ -52,3 +52,14 @@ %!assert (! is_valid_file_id ("not_a_file_id")) %!assert (! is_valid_file_id (-1)) %!assert (! is_valid_file_id (pi)) +%!test <*65543> +%! unwind_protect +%! fid = tmpfile (); +%! assert (is_valid_file_id (fid)); +%! unwind_protect_cleanup +%! fclose (fid); +%! end_unwind_protect + +## Test input validation +%!error <Invalid call> is_valid_file_id () +