Bug #70574 [NEW]: Tests fail due to relying on Linux fallback behavior for gettext()

From: Date: Thu, 24 Sep 2015 16:35:00 +0000
Subject: Bug #70574 [NEW]: Tests fail due to relying on Linux fallback behavior for gettext()
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-196216@lists.php.net to get a copy of this message
From: rainer dot jung at kippdata dot de Operating system: Solaris PHP version: 7.0.0RC3 Package: Gettext related Bug Type: Bug Bug description:Tests fail due to relying on Linux fallback behavior for gettext() Description: ------------ The following six gettext tests fail on Solaris: - ext/gettext/tests/gettext_basic-enus.phpt - ext/gettext/tests/gettext_bindtextdomain-cwd.phpt - ext/gettext/tests/gettext_dcgettext.phpt - ext/gettext/tests/gettext_dgettext.phpt - ext/gettext/tests/gettext_dngettext-plural.phpt - ext/gettext/tests/gettext_ngettext.phpt They fail, because they set locale to en_US.UTF-8, but the message catalog used in the tests is located in ext/gettext/tests/locale/en. On Linux, gettext() has a fallback behavior. If it can't find the message for a certain locale, it will try other similar locals. So after looking for en_US.UTF-8, it checks en_US and finally en. But this behavior is a non-standard extension. On Solaris, gettext() will not fall back from en_US.UTF-8 to en. The problem can be fixed for any platform, by moving the directory with the test message catalog to the correct place: - move ext/gettext/tests/locale/en to ext/gettext/tests/locale/en_US.UTF-8 - move ext/gettext/tests/locale/fi to ext/gettext/tests/locale/fi_FI -- Edit bug report at https://bugs.php.net/bug.php?id=70574&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=70574&r=trysnapshot54 Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=70574&r=trysnapshot55 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=70574&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=70574&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=70574&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=70574&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=70574&r=needscript Try newer version: https://bugs.php.net/fix.php?id=70574&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=70574&r=support Expected behavior: https://bugs.php.net/fix.php?id=70574&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=70574&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=70574&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=70574&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=70574&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=70574&r=dst IIS Stability: https://bugs.php.net/fix.php?id=70574&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=70574&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=70574&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=70574&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=70574&r=mysqlcfg

« previous php.bugs (#196216) next »