diff scripts/help/which.m @ 12843:3035c2e130de

codesprint: Tests for which.m * which.m: 3 tests for function.
author Rik <octave@nomad.inbox5.com>
date Sat, 16 Jul 2011 15:09:34 -0700
parents e1851653d59c
children 72c96de7a403
line wrap: on
line diff
--- a/scripts/help/which.m
+++ b/scripts/help/which.m
@@ -53,3 +53,13 @@
   endif
 
 endfunction
+
+
+%!test
+%! str = which ("ls");
+%! assert (str(end-17:end), strcat ("miscellaneous", filesep(), "ls.m"));
+%!test
+%! str = which ("dot");
+%! assert (str(end-6:end), "dot.oct");
+
+%!assert (which ("NO_NAME"), "");