changeset 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 a52b4e9f45e3
children e51ad94535b9
files scripts/help/which.m
diffstat 1 files changed, 10 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/scripts/help/which.m	Sat Jul 16 18:05:35 2011 -0400
+++ b/scripts/help/which.m	Sat Jul 16 15:09:34 2011 -0700
@@ -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"), "");