# HG changeset patch # User John W. Eaton # Date 1230151365 18000 # Node ID 869e4213d5d9f0ebf21e61933d6230305d344bd5 # Parent 20cbb0fdab48fd23a2e76b4bcc6689d886f62c86 fntests.m: use fread instead of fscanf to preserve whitespace diff -r 20cbb0fdab48 -r 869e4213d5d9 test/ChangeLog --- a/test/ChangeLog Wed Dec 24 15:27:49 2008 -0500 +++ b/test/ChangeLog Wed Dec 24 15:42:45 2008 -0500 @@ -1,3 +1,8 @@ +2008-12-24 John W. Eaton + + * fntests.m (hastests): Use fread instead of fscanf to preserve + whitespace. + 2008-12-02 Jaroslav Hajek * build_sparse_tests.sh: Fix test. diff -r 20cbb0fdab48 -r 869e4213d5d9 test/fntests.m --- a/test/fntests.m Wed Dec 24 15:27:49 2008 -0500 +++ b/test/fntests.m Wed Dec 24 15:42:45 2008 -0500 @@ -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"));