Annotation of embedaddon/php/ext/gettext/tests/gettext_ngettext.phpt, revision 1.1

1.1     ! misho       1: --TEST--
        !             2: Test ngettext() functionality
        !             3: --SKIPIF--
        !             4: <?php 
        !             5:        if (!extension_loaded("gettext")) {
        !             6:                die("SKIP extension gettext 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: ?>
        !            12: --FILE--
        !            13: <?php // $Id: gettext_ngettext.phpt 282362 2009-06-18 07:29:09Z zoe $
        !            14: chdir(dirname(__FILE__));
        !            15: setlocale(LC_ALL, 'en_US.UTF-8');
        !            16: bindtextdomain('dngettextTest', './locale');
        !            17: textdomain('dngettextTest');
        !            18: var_dump(ngettext('item', 'items', 1));
        !            19: var_dump(ngettext('item', 'items', 2));
        !            20: ?>
        !            21: --EXPECT--
        !            22: string(7) "Produkt"
        !            23: string(8) "Produkte"
        !            24: --CREDITS--
        !            25: Christian Weiske, cweiske@php.net
        !            26: PHP Testfest Berlin 2009-05-09

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