Mercurial > hg > octave-kai
changeset 8423:869e4213d5d9
fntests.m: use fread instead of fscanf to preserve whitespace
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Wed, 24 Dec 2008 15:42:45 -0500 |
parents | 20cbb0fdab48 |
children | a84d71abdc5b |
files | test/ChangeLog test/fntests.m |
diffstat | 2 files changed, 7 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/test/ChangeLog +++ b/test/ChangeLog @@ -1,3 +1,8 @@ +2008-12-24 John W. Eaton <jwe@octave.org> + + * fntests.m (hastests): Use fread instead of fscanf to preserve + whitespace. + 2008-12-02 Jaroslav Hajek <highegg@gmail.com> * build_sparse_tests.sh: Fix test.
--- a/test/fntests.m +++ b/test/fntests.m @@ -68,9 +68,10 @@ puts ("\n"); endfunction +## FIXME -- should we only try match the keyword at the start of a line? function y = hastests (f) fid = fopen (f); - str = fscanf (fid, "%s"); + str = fread (fid, "*char")'; fclose (fid); y = (findstr (str, "%!test") || findstr (str, "%!assert") || findstr (str, "%!error") || findstr (str, "%!warning"));