diff scripts/testfun/runtests.m @ 11032:c9b0a75b02e8

Make all regexp in Octave compatible with both POSIX and PCRE.
author Rik <octave@nomad.inbox5.com>
date Tue, 28 Sep 2010 09:25:14 -0700
parents fa56fd98c0c5
children 1740012184f9
line wrap: on
line diff
--- a/scripts/testfun/runtests.m
+++ b/scripts/testfun/runtests.m
@@ -82,7 +82,7 @@
     fclose (fid);
     ## Avoid PCRE 'lineanchors' by searching for newline followed by PTN.
     ## Equivalent to regexp ('^PTN','lineanchors')
-    retval = ! isempty (regexp (str, '[\r\n]\s*%!(test|assert|error|warning)', "once"));
+    retval = ! isempty (regexp (str, "[\r\n]\\s*%!(test|assert|error|warning)", "once"));
   else
     error ("runtests: fopen failed: %s", f);
   endif