File:
[ELWIX - Embedded LightWeight unIX -] /
embedaddon /
php /
ext /
gettext /
tests /
gettext_bindtextdomain-cwd.phpt
Revision
1.1.1.1 (vendor branch):
download - view:
text,
annotated -
select for diffs -
revision graph
Tue Feb 21 23:47:56 2012 UTC (12 years, 6 months ago) by
misho
Branches:
php,
MAIN
CVS tags:
v5_4_3elwix,
v5_4_29p0,
v5_4_29,
v5_4_20p0,
v5_4_20,
v5_4_17p0,
v5_4_17,
v5_3_10,
HEAD
php
--TEST--
Test if bindtextdomain() returns string id if no directory path is set(if directory path is 'null')
--SKIPIF--
<?php
if (!extension_loaded("gettext")) {
die("skip gettext extension is not loaded.\n");
}
if (!setlocale(LC_ALL, 'en_US.UTF-8')) {
die("skip en_US.UTF-8 locale not supported.");
}
--FILE--
<?php
$base_dir = dirname(__FILE__);
chdir($base_dir);
setlocale(LC_ALL, 'en_US.UTF-8');
bindtextdomain('messages',null);
var_dump(gettext('Basic test'));
bindtextdomain('messages', './locale');
var_dump(gettext('Basic test'));
?>
--EXPECTF--
string(10) "Basic test"
string(12) "A basic test"
--CREDIT--
Moritz Neuhaeuser, info@xcompile.net
PHP Testfest Berlin 2009-05-09
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>