Imported Upstream version 0.19.7
[platform/upstream/gettext.git] / gettext-tools / tests / msgcat-7
1 #! /bin/sh
2 . "${srcdir=.}/init.sh"; path_prepend_ . ../src
3
4 # Verify 'msgcat --sort-output'
5
6 cat <<EOF > mcat-test7.in1
7 #: clients/inst_language.ycp:119
8 msgid "two"
9 msgstr "2"
10
11 #: clients/inst_language.ycp:108
12 msgid ""
13 "one"
14 msgstr ""
15 "1"
16 EOF
17
18 rm -f mcat-test7.tmp
19 : ${MSGCAT=msgcat}
20 ${MSGCAT} --sort-output -o mcat-test7.tmp mcat-test7.in1 || exit 1
21 LC_ALL=C tr -d '\r' < mcat-test7.tmp > mcat-test7.out || exit 1
22
23 cat << EOF > mcat-test7.ok
24 #: clients/inst_language.ycp:108
25 msgid "one"
26 msgstr "1"
27
28 #: clients/inst_language.ycp:119
29 msgid "two"
30 msgstr "2"
31 EOF
32
33 : ${DIFF=diff}
34 ${DIFF} mcat-test7.ok mcat-test7.out
35 result=$?
36
37 exit $result