]> granicus.if.org Git - php/commitdiff
Added simple test for gettext
authorfoobar <sniper@php.net>
Tue, 23 Sep 2003 10:00:23 +0000 (10:00 +0000)
committerfoobar <sniper@php.net>
Tue, 23 Sep 2003 10:00:23 +0000 (10:00 +0000)
ext/gettext/tests/gettext_basic.phpt [new file with mode: 0644]
ext/gettext/tests/locale/fi/LC_MESSAGES/messages.mo [new file with mode: 0644]
ext/gettext/tests/locale/fi/LC_MESSAGES/messages.po [new file with mode: 0644]

diff --git a/ext/gettext/tests/gettext_basic.phpt b/ext/gettext/tests/gettext_basic.phpt
new file mode 100644 (file)
index 0000000..734cc81
--- /dev/null
@@ -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 (file)
index 0000000..55f4d1a
Binary files /dev/null and b/ext/gettext/tests/locale/fi/LC_MESSAGES/messages.mo 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 (file)
index 0000000..3505156
--- /dev/null
@@ -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"