xref: /netbsd-src/external/gpl2/gettext/dist/gettext-tools/tests/msgcat-7 (revision 946379e7b37692fc43f68eb0d1c10daa0a7f3b6c)
1#! /bin/sh
2
3# Verify 'msgcat --sort-output'
4
5tmpfiles=""
6trap 'rm -fr $tmpfiles' 1 2 3 15
7
8tmpfiles="$tmpfiles mcat-test7.in1"
9cat <<EOF > mcat-test7.in1
10#: clients/inst_language.ycp:119
11msgid "two"
12msgstr "2"
13
14#: clients/inst_language.ycp:108
15msgid ""
16"one"
17msgstr ""
18"1"
19EOF
20
21tmpfiles="$tmpfiles mcat-test7.out"
22rm -f mcat-test7.out
23: ${MSGCAT=msgcat}
24${MSGCAT} --sort-output -o mcat-test7.out mcat-test7.in1
25test $? = 0 || { rm -fr $tmpfiles; exit 1; }
26
27tmpfiles="$tmpfiles mcat-test7.ok"
28cat << EOF > mcat-test7.ok
29#: clients/inst_language.ycp:108
30msgid "one"
31msgstr "1"
32
33#: clients/inst_language.ycp:119
34msgid "two"
35msgstr "2"
36EOF
37
38: ${DIFF=diff}
39${DIFF} mcat-test7.ok mcat-test7.out
40result=$?
41
42rm -fr $tmpfiles
43
44exit $result
45