now i get the issue. It grabbs more than one line! This means
run-tests.php has to be fixed. The whole thing is designed under
the assumption that %s catches no new lines and hence only one
line.
That would be the best answer but I think it's a difficult fix and
whatever it was might break other tests. I think it would mean replacing
%s with something other than .+?. I'll have a look tomorrow and see if I
can find a regex that would do - one of the things that had me confused
for a while was that I thought the ? (non-greedy qualifier) should
guarentee the minimum match but it doesn't work quite like that.
OK, so basically it is impossible to fix the current regex to match what we
want (I had a quick chat with the PCRE author and he thinks the same).
I propose the following patch:
http://web.ist.utl.pt/nuno.lopes/php_run_tests_%s.txt
The main changes are:
'%s' => '[^\r\n]+'
'%a' => '.+'
This means that some tests have to be fixed, but the majority passes. Most
important is that with this patch I found some tests that had the expected
output wrong.
So unless someone rejects this patch, I'll commit it (and update the
http://qa.php.net/write-test.php page too).
Anyway, I don't think that a function name should be replaced by %s. The
expected output should be as stricter as possible.
Nuno
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php