Re: AW: strcoll.phpt
| From: | zoe | Date: | Wed, 29 Apr 2009 13:01:53 +0000 |
| Subject: | Re: AW: strcoll.phpt | ||
| References: | 1 2 | Groups: | php.qa |
| Request: | Send a blank email to php-qa+get-64824@lists.php.net to get a copy of this message | ||
S. Schürmann wrote:
Hmm Shouldn't this then be different Tests for 32 and 64 bit versions ? S.I don't think so. If the documented behaviour is the same on both platforms, why would need a separate test? By the way, by convention people don't 'top-post' on PHP mailing lists :-) Zoe
----- Ursprüngliche Mail ---- Von: zoe <zoe.slattery@googlemail.com> An: S. Schürmann <sschuermann303@yahoo.de>; PHP QA List <php-qa@lists.php.net> Gesendet: Mittwoch, den 29. April 2009, 10:06:11 Uhr Betreff: strcoll.phpt Hi Sebs I have fixed your test to follow the documented behaviour. Interestingly Tony also fixed it last night to expect '32', that suggests that it didn't work on 64 bit Linux either ( I think that is what Tony runs). Here is the fixed test: --TEST-- Testing Basic behaviour of strcoll() --CREDITS-- Sebastian Schürmann sebs@php.net Testfest 2009 Munich --FILE-- <?php $a = 'a'; $b = 'A'; setlocale (LC_COLLATE, 'C'); $result = strcoll($a, $b); if($result > 0) { echo "Pass\n"; } ?> --EXPECT-- Pass Another point is that it doesn't work on PHP6 either, but I think this is a PHP6 problem. The output from the test on PHP6 is: Deprecated: setlocale(): deprecated in Unicode mode, please use ICU locale functions in /mnt/workspace/PHP/php6/ext/standard/tests/strings/strcoll.php on line 6 I think this is wrong, if the behaviour is deprecated the test should still run and produce 'Pass', but it doesn't. I've committed the test in PHP6 anyway but will follow up with someone that knows PHP6 better than I do in case I have misunderstood the expected behaviour. It's possible that we need a PHP6 specific version of this test. One final minor point, the test would have been better named strcoll_basic.phpt. It's important enough to change it now, but that is what the conventions say on the qa.php.net pages. Zoe