aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArnold D. Robbins <arnold@skeeve.com>2018-01-15 20:36:22 +0200
committerArnold D. Robbins <arnold@skeeve.com>2018-01-15 20:36:22 +0200
commitd6b4e76120053e3572e593b8c1c8518c0fa8b432 (patch)
tree2f054da053873b95579a38a30006786722de565b
parentbf757c5ee278975b419c337d0ab63681d4529245 (diff)
parent9fbc02b23f7843c3be03d12eaba2f154642217df (diff)
downloadegawk-d6b4e76120053e3572e593b8c1c8518c0fa8b432.tar.gz
egawk-d6b4e76120053e3572e593b8c1c8518c0fa8b432.tar.bz2
egawk-d6b4e76120053e3572e593b8c1c8518c0fa8b432.zip
Merge branch 'gawk-4.2-stable'
-rw-r--r--test/ChangeLog6
-rw-r--r--test/Makefile.am1
-rw-r--r--test/nlstringtest.awk12
-rw-r--r--test/nlstringtest.ok5
-rw-r--r--test/nlstringtest.po16
5 files changed, 37 insertions, 3 deletions
diff --git a/test/ChangeLog b/test/ChangeLog
index 0226d537..eca4313a 100644
--- a/test/ChangeLog
+++ b/test/ChangeLog
@@ -1,9 +1,9 @@
2018-01-15 Arnold D. Robbins <arnold@skeeve.com>
* Makefile.am (nlstringtest): New test.
- * nlstringtest.awk, nlstringtest.ok, fr/LC_MESSAGES/nlstringtest.mo:
- New files. Thanks to Bruno Haible <bruno@clisp.org>
- for the test.
+ * nlstringtest.awk, nlstringtest.ok, nlstringtest.po,
+ fr/LC_MESSAGES/nlstringtest.mo: New files. Thanks to
+ Bruno Haible <bruno@clisp.org> for the test.
2018-01-04 Arnold D. Robbins <arnold@skeeve.com>
diff --git a/test/Makefile.am b/test/Makefile.am
index 8d663c5b..81b36066 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -716,6 +716,7 @@ EXTRA_DIST = \
nlstrina.ok \
nlstringtest.awk \
nlstringtest.ok \
+ nlstringtest.po \
fr \
noeffect.awk \
noeffect.ok \
diff --git a/test/nlstringtest.awk b/test/nlstringtest.awk
new file mode 100644
index 00000000..da0d91b0
--- /dev/null
+++ b/test/nlstringtest.awk
@@ -0,0 +1,12 @@
+BEGIN {
+ n = 2
+ TEXTDOMAIN = "nlstringtest"
+# bindtextdomain ("./")
+ bindtextdomain (ARGV[1])
+
+ printf dcngettext ("a piece of cake", "%d pieces of cake", n) "\n", n
+
+ print _"%s is replaced by %s."
+ print _"%s is replaced by %s." "\n"
+ printf _"%s is replaced by %s." "\n", "FF", "EUR"
+}
diff --git a/test/nlstringtest.ok b/test/nlstringtest.ok
new file mode 100644
index 00000000..c06d9e46
--- /dev/null
+++ b/test/nlstringtest.ok
@@ -0,0 +1,5 @@
+2 morceaux de gateau
+%2$s remplace %1$s.
+%2$s remplace %1$s.
+
+EUR remplace FF.
diff --git a/test/nlstringtest.po b/test/nlstringtest.po
new file mode 100644
index 00000000..6423ce38
--- /dev/null
+++ b/test/nlstringtest.po
@@ -0,0 +1,16 @@
+msgid ""
+msgstr ""
+"Content-Type: text/plain; charset=ISO-8859-1\n"
+"Plural-Forms: nplurals=2; plural=(n > 1);\n"
+
+# Les gateaux allemands sont les meilleurs du monde.
+#, awk-format
+msgid "a piece of cake"
+msgid_plural "%d pieces of cake"
+msgstr[0] "un morceau de gateau"
+msgstr[1] "%d morceaux de gateau"
+
+# Reverse the arguments.
+#, awk-format
+msgid "%s is replaced by %s."
+msgstr "%2$s remplace %1$s."