diff scripts/plot/xlabel.m @ 13136:79b9a7669bb8

Tests added for scripts/plot (plot/ishghandle.m, plot/text.m, plot/title.m, plot/xlabel.m, plot/ylabel.m, plot/zlabel.m): Tests added for plot functions. plot/whitebg.m: Fix typo. Change colors only for figure under test
author Kai Habel <kai.habel@gmx.de>
date Wed, 14 Sep 2011 21:03:39 +0200
parents 62b7ea59a6ff
children e81ddf9cacd5
line wrap: on
line diff
--- a/scripts/plot/xlabel.m
+++ b/scripts/plot/xlabel.m
@@ -53,3 +53,15 @@
   endif
 
 endfunction
+
+%!test
+%! hf = figure ("visible", "off");
+%! unwind_protect  
+%!   x = xlabel ("xlabel_string");
+%!   assert (get(gca, "xlabel"), x);
+%!   assert (get(x, "type"), "text");
+%!   assert (get(x, "visible"), "on");
+%!   assert (get(x, "string"), "xlabel_string");
+%! unwind_protect_cleanup
+%!   close (hf);
+%! end_unwind_protect