2 . "${srcdir=.}/init.sh"; path_prepend_ . ../src
4 # Test general operation.
6 cat <<EOF > men-test1.po
11 "Content-Type: text/plain; charset=ASCII\n"
12 "Content-Transfer-Encoding: 8bit\n"
14 msgid "height must be positive"
17 msgid "color cannot be transparent"
18 msgstr "colour cannot be transparent"
20 msgid "width must be positive"
24 msgid_plural "%d errors"
30 ${MSGEN} -o men-test1.tmp men-test1.po || exit 1
31 LC_ALL=C tr -d '\r' < men-test1.tmp > men-test1.out || exit 1
33 cat <<EOF > men-test1.ok
38 "Content-Type: text/plain; charset=ASCII\n"
39 "Content-Transfer-Encoding: 8bit\n"
41 msgid "height must be positive"
42 msgstr "height must be positive"
44 msgid "color cannot be transparent"
45 msgstr "colour cannot be transparent"
47 msgid "width must be positive"
48 msgstr "width must be positive"
51 msgid_plural "%d errors"
57 ${DIFF} men-test1.ok men-test1.out
59 test $result = 0 || exit $result
62 ${MSGEN} --lang=fr -o men-test1.tmp men-test1.po || exit 1
63 grep "Language: fr" men-test1.tmp 2>&1 >/dev/null || exit 1
64 grep -v "Language: fr" men-test1.tmp | LC_ALL=C tr -d '\r' > men-test1.out || exit 1
66 ${DIFF} men-test1.ok men-test1.out
68 test $result = 0 || exit $result