summaryrefslogtreecommitdiff
path: root/ext/gettext/tests
diff options
context:
space:
mode:
authorAntony Dovgal <tony2001@php.net>2006-09-05 10:36:24 +0000
committerAntony Dovgal <tony2001@php.net>2006-09-05 10:36:24 +0000
commitc622ded86672eb6958794cc25629d9f4106dc74b (patch)
treeca2560d0826b1d1412b7992c47f5dde353edfa65 /ext/gettext/tests
parent731b68fbc5821ca8c185104a0e4f5bac60fd89a9 (diff)
downloadphp-git-c622ded86672eb6958794cc25629d9f4106dc74b.tar.gz
fix typo, add test
Diffstat (limited to 'ext/gettext/tests')
-rw-r--r--ext/gettext/tests/dcngettext.phpt30
1 files changed, 30 insertions, 0 deletions
diff --git a/ext/gettext/tests/dcngettext.phpt b/ext/gettext/tests/dcngettext.phpt
new file mode 100644
index 0000000000..e5961eb1e9
--- /dev/null
+++ b/ext/gettext/tests/dcngettext.phpt
@@ -0,0 +1,30 @@
+--TEST--
+dcngettext() tests
+--SKIPIF--
+<?php
+if (!extension_loaded("gettext")) die("skip");
+if (!function_exists("dcngettext")) die("skip dcngettext() doesn't exist");
+?>
+--FILE--
+<?php
+
+var_dump(dcngettext(1,1,1,1));
+var_dump(dcngettext(1,1,1,1,1));
+var_dump(dcngettext("test","test","test",1,1));
+var_dump(dcngettext("test","test","test",0,0));
+var_dump(dcngettext("test","test","test",-1,-1));
+var_dump(dcngettext("","","",1,1));
+var_dump(dcngettext("","","",0,0));
+
+echo "Done\n";
+?>
+--EXPECTF--
+Warning: Wrong parameter count for dcngettext() in %s on line %d
+bool(false)
+string(1) "1"
+string(4) "test"
+string(4) "test"
+string(4) "test"
+string(0) ""
+string(0) ""
+Done