# HG changeset patch # User magedrifaat # Date 1657998127 -7200 # Node ID 9b3685afb4e7941db9ab0ab1cf04cc46996054cd # Parent 5b3465a9c34085c50bd9f69c3bf68cf982ee40f7 Tiff.m added a first test with empty image * Tiff.m: added a test to create and read an empty image with no directories. diff -r 5b3465a9c340 -r 9b3685afb4e7 scripts/io/Tiff.m --- 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