Imported Upstream version 0.19.7
[platform/upstream/gettext.git] / gettext-tools / tests / msgcat-properties-1
1 #! /bin/sh
2 . "${srcdir=.}/init.sh"; path_prepend_ . ../src
3
4 # Test --use-first option with Java .properties syntax.
5
6 cat <<\EOF > mcat-p-1.in1
7 #. Help text (HTML-like) START
8 #: clients/inst_ask_config.ycp:119
9 Congratulations\!=Gl\u00fcckwunsch\!
10 EOF
11
12 cat <<\EOF > mcat-p-1.in2
13 #. Help text (HTML-like) START
14 #: clients/inst_ask_config.ycp:119
15 Congratulations\!=Herzlichen Gl\u00fcckwunsch\!
16 EOF
17
18 rm -f mcat-p-1.tmp
19
20 : ${MSGCAT=msgcat}
21 ${MSGCAT} --use-first --more-than=0 --properties-input --properties-output \
22     -o mcat-p-1.tmp mcat-p-1.in1 mcat-p-1.in2 || exit 1
23 LC_ALL=C tr -d '\r' < mcat-p-1.tmp > mcat-p-1.out || exit 1
24
25 cat << \EOF > mcat-p-1.ok
26 #. Help text (HTML-like) START
27 #: clients/inst_ask_config.ycp:119
28 Congratulations\!=Gl\u00fcckwunsch\!
29 EOF
30
31 : ${DIFF=diff}
32 ${DIFF} mcat-p-1.ok mcat-p-1.out
33 result=$?
34
35 exit $result