diff scripts/plot/legend.m @ 17107:dbd64c9a16da

Restore graphics toolkit after %!tests that alter it. * scripts/plot/allchild.m, scripts/plot/findall.m, scripts/plot/findobj.m, scripts/plot/graphics_toolkit.m, scripts/plot/legend.m, scripts/plot/uimenu.m: Restore graphics toolkit after %!tests that alter it.
author Rik <rik@octave.org>
date Mon, 29 Jul 2013 12:23:10 -0700
parents 991e8a386aa3
children bd50e0660545
line wrap: on
line diff
--- a/scripts/plot/legend.m	Mon Jul 29 15:04:52 2013 -0400
+++ b/scripts/plot/legend.m	Mon Jul 29 12:23:10 2013 -0700
@@ -1547,8 +1547,8 @@
 %!  legend (option);
 
 %!test
-%! graphics_toolkit ("gnuplot");
-%! h = figure ("visible", "off", "__graphics_toolkit__", "gnuplot");
+%! toolkit = graphics_toolkit ("gnuplot");
+%! h = figure ("visible", "off")
 %! unwind_protect
 %!   position = get (h, "position");
 %!   plot (rand (3));
@@ -1559,5 +1559,6 @@
 %!   assert (get (h, "position"), position);
 %! unwind_protect_cleanup
 %!   close (h);
+%!   graphics_toolkit (toolkit);
 %! end_unwind_protect