# HG changeset patch # User Rik # Date 1310854174 25200 # Node ID 3035c2e130de91aac73ead53b04416458e845775 # Parent a52b4e9f45e39ee2f90e035d9898345e56a05151 codesprint: Tests for which.m * which.m: 3 tests for function. diff --git a/scripts/help/which.m b/scripts/help/which.m --- 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"), "");