Mercurial > octave-libtiff
changeset 31116:9b3685afb4e7
Tiff.m added a first test with empty image
* Tiff.m: added a test to create and read an empty image
with no directories.
author | magedrifaat <magedrifaat@gmail.com> |
---|---|
date | Sat, 16 Jul 2022 21:02:07 +0200 |
parents | 5b3465a9c340 |
children | 530dbd1d6b07 |
files | scripts/io/Tiff.m |
diffstat | 1 files changed, 13 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/scripts/io/Tiff.m Sat Jul 16 19:05:09 2022 +0200 +++ b/scripts/io/Tiff.m Sat Jul 16 21:02:07 2022 +0200 @@ -102,4 +102,16 @@ % TODO(maged): add documentation and make print_usage work endmethods -endclassdef \ No newline at end of file +endclassdef + +## test empty image +%!testif HAVE_TIFF +%! filename = [tempname() ".tif"]; +%! unwind_protect +%! a = Tiff (filename, "w"); +%! a.close (); +%! a = Tiff (filename, "rh"); +%! a.close (); +%! unwind_protect_cleanup +%! unlink (filename); +%! end_unwind_protect