Re: EXPECTREGEX
| From: | Derick Rethans | Date: | Wed, 09 May 2007 14:05:17 +0000 |
| Subject: | Re: EXPECTREGEX | ||
| References: | 1 | Groups: | php.qa |
| Request: | Send a blank email to php-qa+get-29578@lists.php.net to get a copy of this message | ||
On Wed, 9 May 2007, Oliver Block wrote:
> Hello list,
>
> in order to adapt a test to the different condition it has to face on every system, I defined
> an --EXPECTREGEX-- section for a test as follows:
>
> --EXPECTREGEX--
>
> Warning: imap_mail_compose2() expects parameter 1 to be array, null given in
> [[:graph:]]*test_cmp00.php on line [0-9]+
>
>
> A dump results in the following output:
>
> =====================================================================
> Running selected tests.
> string(118) "Warning: imap_mail_compose2() expects parameter 1 to be array, null given in
> [[:graph:]]*test_cmp00.php on line [0-9]+"
> ================================================================================
> string(141) "Warning: imap_mail_compose2() expects parameter 1 to be array, null given in
> /usr/local/src/php-5.2.2/ext/imap/tests/test_cmp00.php on line 3"
> FAIL imap_mail_compose2() function [ext/imap/tests/test_cmp00.phpt]
> =====================================================================
>
> Is my regex wrong, or is the test tool yet not ready to use regex of that kind?
It's easier to do this:
--EXPECTF--
string(118) "Warning: imap_mail_compose2() expects parameter 1 to be array, null given in
%stest_cmp00.php on line [0-9]+"
And I think you need preg regular expression for expectregex...
regards,
Derick