diff scripts/plot/close.m @ 13123:6efa1a691713

Add further tests for scripts/plot. plot/close.m: Tests added. plot/gca.m, plot/gcbf.m, plot/gcbo.m, plot/hggroup.m, plot/isfigure.m: Ditto. plot/gtext.m, plot/ginput.m: Dummy test added.
author Kai Habel <kai.habel@gmx.de>
date Sun, 11 Sep 2011 18:24:58 +0200
parents fd0a3ac60b0e
children 2ea1658ad049
line wrap: on
line diff
--- a/scripts/plot/close.m
+++ b/scripts/plot/close.m
@@ -79,3 +79,15 @@
   endwhile
 
 endfunction
+
+%!test
+%! hf = figure (1232, "visible", "off");
+%! unwind_protect
+%!   close (1232);
+%!   objs = findobj ("type", "figure");
+%!   assert (isempty (intersect (objs, 1232)));
+%! unwind_protect_cleanup
+%!   if (isfigure (1232))
+%!     close (hf);
+%!   endif
+%! end_unwind_protect