Re: UEXPECTF is gone: any way to write "portable" tests?
| From: | Ulf Wendel | Date: | Thu, 24 Jul 2008 09:04:45 +0000 |
| Subject: | Re: UEXPECTF is gone: any way to write "portable" tests? | ||
| References: | 1 2 3 4 5 6 7 8 | Groups: | php.qa |
| Request: | Send a blank email to php-qa+get-64401@lists.php.net to get a copy of this message | ||
Ahoi Lars!
Lars Strojny schrieb:
Am Donnerstag, den 24.07.2008, 10:08 +0200 schrieb Ulf Wendel: [...]Yes, but its not much "safer" than %(%d) for string(3), string(4), unicode(13) etc... Its replacing a hack with a hack. Current PHP 6: var_dump(<binary string>) -> unicode %unicode|string% will match it just fine. But how do I know that I really got a binary string and not a unicode string? PHP 6 makes no distinction between the two of them. In PHP 5 there is no need to distinct between binary string and non-binary string as all strings are binary strings. Old/early PHP6 UEXPECTF: var_dump(<binary_string>) -> string UEXPECTF was there to handle it. And PHP 6 made a distinction between binary (string) and (unicode) string. PHP6 suggestion from Marcus (which I agree to and hope that it will happen): var_dump(<binary_string>) -> binary %unicode|string% will not match it. PHP 6 is in flux as it seems. Without knowing the final var_dump() output format it will he hard to adapt run-tests.phpt. UlfPHP 5:%unicode|string%(%d) "varbinary_column" should work, no?string(<length>) "varbinary_column"PHP 6 in the past:string(<length>) "varbinary_column" (distinction string vs. binary, "BC compliant")