summaryrefslogtreecommitdiff
path: root/ext/gettext
diff options
context:
space:
mode:
authorfoobar <sniper@php.net>2003-09-23 10:00:23 +0000
committerfoobar <sniper@php.net>2003-09-23 10:00:23 +0000
commit9fea9fec5330ec4f8f21d97c7057b9da830d399f (patch)
tree099eb696949e223bd6238367068508bec417d433 /ext/gettext
parenta299e943f83f497999a3d07158749bdc457ea687 (diff)
downloadphp-git-9fea9fec5330ec4f8f21d97c7057b9da830d399f.tar.gz
Added simple test for gettext
Diffstat (limited to 'ext/gettext')
-rw-r--r--ext/gettext/tests/gettext_basic.phpt18
-rw-r--r--ext/gettext/tests/locale/fi/LC_MESSAGES/messages.mobin0 -> 199 bytes
-rw-r--r--ext/gettext/tests/locale/fi/LC_MESSAGES/messages.po15
3 files changed, 33 insertions, 0 deletions
diff --git a/ext/gettext/tests/gettext_basic.phpt b/ext/gettext/tests/gettext_basic.phpt
new file mode 100644
index 0000000000..734cc814ad
--- /dev/null
+++ b/ext/gettext/tests/gettext_basic.phpt
@@ -0,0 +1,18 @@
+--TEST--
+Gettext basic test
+--SKIPIF--
+<?php if (!extension_loaded("gettext")) print "skip"; ?>
+--FILE--
+<?php // $Id$
+
+chdir(dirname(__FILE__));
+setlocale(LC_ALL, 'fi_FI');
+bindtextdomain ("messages", "./locale");
+textdomain ("messages");
+echo gettext("Basic test"), "\n";
+echo _("Basic test"), "\n";
+
+?>
+--EXPECT--
+Perustesti
+Perustesti
diff --git a/ext/gettext/tests/locale/fi/LC_MESSAGES/messages.mo b/ext/gettext/tests/locale/fi/LC_MESSAGES/messages.mo
new file mode 100644
index 0000000000..55f4d1a341
--- /dev/null
+++ b/ext/gettext/tests/locale/fi/LC_MESSAGES/messages.mo
Binary files differ
diff --git a/ext/gettext/tests/locale/fi/LC_MESSAGES/messages.po b/ext/gettext/tests/locale/fi/LC_MESSAGES/messages.po
new file mode 100644
index 0000000000..3505156f74
--- /dev/null
+++ b/ext/gettext/tests/locale/fi/LC_MESSAGES/messages.po
@@ -0,0 +1,15 @@
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the PACKAGE package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=ISO-8859-1\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: gettext_basic.phpt:11
+msgid "Basic test"
+msgstr "Perustesti"