diff options
author | Bruno Haible <bruno@clisp.org> | 2003-02-14 15:37:51 +0000 |
---|---|---|
committer | Bruno Haible <bruno@clisp.org> | 2009-06-23 12:09:49 +0200 |
commit | 803638bb0396e0687bbba0ac40ce769c2dd49fce (patch) | |
tree | c69c0c1f114e9ba1fe8fd1a4beb4dd74d2ec5856 /gettext-tools/tests | |
parent | 09061b79813df011d7a6e8f207a787c30d596082 (diff) | |
download | external_gettext-803638bb0396e0687bbba0ac40ce769c2dd49fce.zip external_gettext-803638bb0396e0687bbba0ac40ce769c2dd49fce.tar.gz external_gettext-803638bb0396e0687bbba0ac40ce769c2dd49fce.tar.bz2 |
Move tests/msgen-1 to gettext-tools/tests/msgen-1.
Diffstat (limited to 'gettext-tools/tests')
-rwxr-xr-x | gettext-tools/tests/msgen-1 | 65 |
1 files changed, 65 insertions, 0 deletions
diff --git a/gettext-tools/tests/msgen-1 b/gettext-tools/tests/msgen-1 new file mode 100755 index 0000000..acd8f6c --- /dev/null +++ b/gettext-tools/tests/msgen-1 @@ -0,0 +1,65 @@ +#! /bin/sh + +tmpfiles="" +trap 'rm -fr $tmpfiles' 1 2 3 15 + +tmpfiles="$tmpfiles men-test1.po" +cat <<EOF > men-test1.po +# HEADER. +# +msgid "" +msgstr "" +"Content-Type: text/plain; charset=ASCII\n" +"Content-Transfer-Encoding: 8bit\n" + +msgid "height must be positive" +msgstr "" + +msgid "color cannot be transparent" +msgstr "colour cannot be transparent" + +msgid "width must be positive" +msgstr "" + +msgid "%d error" +msgid_plural "%d errors" +msgstr[0] "" +msgstr[1] "" +EOF + +tmpfiles="$tmpfiles men-test1.out" +: ${MSGEN=msgen} +${MSGEN} men-test1.po -o men-test1.out +test $? = 0 || { rm -fr $tmpfiles; exit 1; } + +tmpfiles="$tmpfiles men-test1.ok" +cat <<EOF > men-test1.ok +# HEADER. +# +msgid "" +msgstr "" +"Content-Type: text/plain; charset=ASCII\n" +"Content-Transfer-Encoding: 8bit\n" + +msgid "height must be positive" +msgstr "height must be positive" + +msgid "color cannot be transparent" +msgstr "colour cannot be transparent" + +msgid "width must be positive" +msgstr "width must be positive" + +msgid "%d error" +msgid_plural "%d errors" +msgstr[0] "%d error" +msgstr[1] "%d errors" +EOF + +: ${DIFF=diff} +${DIFF} men-test1.ok men-test1.out +result=$? + +rm -fr $tmpfiles + +exit $result |