Annotation of embedaddon/php/ext/gettext/tests/gettext_bindtextdomain-cwd.phpt, revision 1.1.1.1

1.1       misho       1: --TEST--
                      2: Test if bindtextdomain() returns string id if no directory path is set(if directory path is 'null')
                      3: --SKIPIF--
                      4: <?php
                      5: if (!extension_loaded("gettext")) {
                      6:     die("skip gettext extension is not loaded.\n");
                      7: }
                      8: if (!setlocale(LC_ALL, 'en_US.UTF-8')) {
                      9:     die("skip en_US.UTF-8 locale not supported.");
                     10: }
                     11: --FILE--
                     12: <?php
                     13: $base_dir = dirname(__FILE__);
                     14: chdir($base_dir);
                     15: setlocale(LC_ALL, 'en_US.UTF-8');
                     16: bindtextdomain('messages',null);
                     17: var_dump(gettext('Basic test'));
                     18: bindtextdomain('messages', './locale');
                     19: var_dump(gettext('Basic test'));
                     20: 
                     21: ?>
                     22: --EXPECTF--
                     23: string(10) "Basic test"
                     24: string(12) "A basic test"
                     25: --CREDIT--
                     26: Moritz Neuhaeuser, info@xcompile.net
                     27: PHP Testfest Berlin 2009-05-09

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>