summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2006-08-17 11:48:00 +0000
committerBruno Haible <bruno@clisp.org>2009-06-23 12:13:54 +0200
commit6829751e8cb9b0f1f3910fa09ff11481b2e0519f (patch)
treea533175862751e8250e9b41ca9174080032d239d
parente99aea9751b6f5d1f05fcaa28cb6ee4a4e197d9a (diff)
downloadexternal_gettext-6829751e8cb9b0f1f3910fa09ff11481b2e0519f.zip
external_gettext-6829751e8cb9b0f1f3910fa09ff11481b2e0519f.tar.gz
external_gettext-6829751e8cb9b0f1f3910fa09ff11481b2e0519f.tar.bz2
Test ISO C 99 <inttypes.h> format string directives.
-rwxr-xr-xgettext-tools/tests/msgunfmt-234
1 files changed, 34 insertions, 0 deletions
diff --git a/gettext-tools/tests/msgunfmt-2 b/gettext-tools/tests/msgunfmt-2
new file mode 100755
index 0000000..70a1e85
--- /dev/null
+++ b/gettext-tools/tests/msgunfmt-2
@@ -0,0 +1,34 @@
+#! /bin/sh
+
+# Test ISO C 99 <inttypes.h> format string directives.
+# Verify that msgunfmt, applied to a .mo file of major revision 1 (with
+# system-dependent strings), yields a PO file with c-format annotation, so that
+# msgfmt applied to it will again produce a .mo file of major revision 1.
+
+tmpfiles=""
+trap 'rm -fr $tmpfiles' 1 2 3 15
+
+tmpfiles="$tmpfiles mu-2.in"
+cat <<EOF > mu-2.in
+#, c-format
+msgid "truncating at %<PRIuMAX> bytes in output file %s"
+msgstr "schneide bei %<PRIuMAX> Bytes in Ausgabedatei %s ab"
+EOF
+
+tmpfiles="$tmpfiles mu-2.mo"
+: ${MSGFMT=msgfmt}
+${MSGFMT} -o mu-2.mo mu-2.in
+test $? = 0 || { rm -fr $tmpfiles; exit 1; }
+
+tmpfiles="$tmpfiles mu-2.out"
+: ${MSGUNFMT=msgunfmt}
+${MSGUNFMT} -o mu-2.out mu-2.mo
+test $? = 0 || { rm -fr $tmpfiles; exit 1; }
+
+: ${DIFF=diff}
+${DIFF} mu-2.in mu-2.out
+result=$?
+
+rm -fr $tmpfiles
+
+exit $result