No empty .Rs/.Re
[netbsd-mini2440.git] / gnu / dist / gettext / gettext-tools / tests / msgen-1
blobcf4993c4717d78381a9df23a76c343e828a9e91c
1 #! /bin/sh
3 # Test general operation.
5 tmpfiles=""
6 trap 'rm -fr $tmpfiles' 1 2 3 15
8 tmpfiles="$tmpfiles men-test1.po"
9 cat <<EOF > men-test1.po
10 # HEADER.
12 msgid ""
13 msgstr ""
14 "Content-Type: text/plain; charset=ASCII\n"
15 "Content-Transfer-Encoding: 8bit\n"
17 msgid "height must be positive"
18 msgstr ""
20 msgid "color cannot be transparent"
21 msgstr "colour cannot be transparent"
23 msgid "width must be positive"
24 msgstr ""
26 msgid "%d error"
27 msgid_plural "%d errors"
28 msgstr[0] ""
29 msgstr[1] ""
30 EOF
32 tmpfiles="$tmpfiles men-test1.out"
33 : ${MSGEN=msgen}
34 ${MSGEN} men-test1.po -o men-test1.out
35 test $? = 0 || { rm -fr $tmpfiles; exit 1; }
37 tmpfiles="$tmpfiles men-test1.ok"
38 cat <<EOF > men-test1.ok
39 # HEADER.
41 msgid ""
42 msgstr ""
43 "Content-Type: text/plain; charset=ASCII\n"
44 "Content-Transfer-Encoding: 8bit\n"
46 msgid "height must be positive"
47 msgstr "height must be positive"
49 msgid "color cannot be transparent"
50 msgstr "colour cannot be transparent"
52 msgid "width must be positive"
53 msgstr "width must be positive"
55 msgid "%d error"
56 msgid_plural "%d errors"
57 msgstr[0] "%d error"
58 msgstr[1] "%d errors"
59 EOF
61 : ${DIFF=diff}
62 ${DIFF} men-test1.ok men-test1.out
63 result=$?
65 rm -fr $tmpfiles
67 exit $result