diff options
author | Bruno Haible <bruno@clisp.org> | 2003-02-14 15:40:56 +0000 |
---|---|---|
committer | Bruno Haible <bruno@clisp.org> | 2009-06-23 12:09:50 +0200 |
commit | 4b72f40b140e2968dad6a192810f3580e123d539 (patch) | |
tree | 7c83cb1b00c87aa5c26a22a0ac6f4b8862ba6c8e /gettext-tools | |
parent | 94dbaa8212aa06e854834437eaacd15185ec7ee8 (diff) | |
download | external_gettext-4b72f40b140e2968dad6a192810f3580e123d539.zip external_gettext-4b72f40b140e2968dad6a192810f3580e123d539.tar.gz external_gettext-4b72f40b140e2968dad6a192810f3580e123d539.tar.bz2 |
Move tests/msgfmt-12 to gettext-tools/tests/msgfmt-12.
Diffstat (limited to 'gettext-tools')
-rwxr-xr-x | gettext-tools/tests/msgfmt-12 | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/gettext-tools/tests/msgfmt-12 b/gettext-tools/tests/msgfmt-12 new file mode 100755 index 0000000..427b833 --- /dev/null +++ b/gettext-tools/tests/msgfmt-12 @@ -0,0 +1,56 @@ +#! /bin/sh + +# Test ISO C 99 <inttypes.h> format string directives. + +tmpfiles="" +trap 'rm -fr $tmpfiles' 1 2 3 15 + +tmpfiles="$tmpfiles mf-12.po" +cat <<\EOF > mf-12.po +msgid "" +msgstr "Content-Type: text/plain; charset=ISO-8859-1\n" + +#, c-format +msgid "File size is: %<PRId64>" +msgstr "Dateigröße ist: %<PRId64>" + +#, c-format +msgid "File age is %10<PRIdMAX> microseconds" +msgstr "Datei ist %10<PRIdMAX> Mikrosekunden alt." + +msgid "<PRIXFAST16> errors" +msgstr "<PRIXFAST16> Fehler" +EOF + +tmpfiles="$tmpfiles mf-12.mo" +: ${MSGFMT=msgfmt} +${MSGFMT} -o mf-12.mo mf-12.po +test $? = 0 || { rm -fr $tmpfiles; exit 1; } + +tmpfiles="$tmpfiles mf-12.out" +: ${MSGUNFMT=msgunfmt} +${MSGUNFMT} mf-12.mo -o mf-12.out +test $? = 0 || { rm -fr $tmpfiles; exit 1; } + +tmpfiles="$tmpfiles mf-12.ok" +cat <<\EOF > mf-12.ok +msgid "" +msgstr "Content-Type: text/plain; charset=ISO-8859-1\n" + +msgid "<PRIXFAST16> errors" +msgstr "<PRIXFAST16> Fehler" + +msgid "File size is: %<PRId64>" +msgstr "Dateigröße ist: %<PRId64>" + +msgid "File age is %10<PRIdMAX> microseconds" +msgstr "Datei ist %10<PRIdMAX> Mikrosekunden alt." +EOF + +: ${DIFF=diff} +${DIFF} mf-12.ok mf-12.out +result=$? + +rm -fr $tmpfiles + +exit $result |