changeset 16973:d429a05dc11c

legend.m: Move %!test block below %!demo blocks per standard usage. * scripts/plot/legend.m: Move %!test block below %!demo blocks per standard usage.
author Rik <rik@octave.org>
date Sat, 13 Jul 2013 10:44:40 -0700
parents 45afabc5f7c8
children 221e71d2aef0
files scripts/plot/legend.m
diffstat 1 files changed, 15 insertions(+), 14 deletions(-) [+]
line wrap: on
line diff
--- a/scripts/plot/legend.m	Sat Jul 13 10:10:54 2013 -0700
+++ b/scripts/plot/legend.m	Sat Jul 13 10:44:40 2013 -0700
@@ -1180,20 +1180,6 @@
   endif
 endfunction
 
-%!test
-%! graphics_toolkit ("gnuplot");
-%! h = figure ("visible", "off", "__graphics_toolkit__", "gnuplot");
-%! unwind_protect
-%!   position = get (h, "position");
-%!   plot (rand (3))
-%!   legend ()
-%!   filename = sprintf ("%s.eps", tmpnam ());
-%!   print (filename)
-%!   unlink (filename);
-%!   assert (get (h, "position"), position)
-%! unwind_protect_cleanup
-%!   close (h)
-%! end_unwind_protect
 
 %!demo
 %! clf;
@@ -1557,3 +1543,18 @@
 %!  legend ({'12345678901234567890'}, 'location', 'southwestoutside');
 %!  legend (option);
 
+%!test
+%! graphics_toolkit ("gnuplot");
+%! h = figure ("visible", "off", "__graphics_toolkit__", "gnuplot");
+%! unwind_protect
+%!   position = get (h, "position");
+%!   plot (rand (3));
+%!   legend ();
+%!   filename = sprintf ("%s.eps", tmpnam ());
+%!   print (filename);
+%!   unlink (filename);
+%!   assert (get (h, "position"), position);
+%! unwind_protect_cleanup
+%!   close (h);
+%! end_unwind_protect
+