No empty .Rs/.Re
[netbsd-mini2440.git] / gnu / dist / gettext / gettext-tools / tests / msgmerge-properties-1
blob6f56861df0116b404fbce74123bfa14e50a9ce05
1 #! /bin/sh
3 # Test handling of obsolete/untranslated messages with Java .properties syntax.
5 tmpfiles=""
6 trap 'rm -fr $tmpfiles' 1 2 3 15
8 tmpfiles="$tmpfiles mm-p-1.in1 mm-p-1.in2"
9 cat <<EOF > mm-p-1.in1
11 # def.po
13 #: file:100
14 not\ existing=but with translation
16 #: file2:101
17 !not\ existing\ without\ translation=
19 #: file3:102
20 still\ existing=translation
23 # trailing comments should be removed
24 EOF
26 cat <<EOF > mm-p-1.in2
28 # ref.po
30 #: file3:102
31 still\ existing=here is normally no comment
33 #: file4:10
34 !untranslated=
37 # trailing comments should be removed, even here
38 EOF
40 tmpfiles="$tmpfiles mm-p-1.out"
41 : ${MSGMERGE=msgmerge}
42 ${MSGMERGE} -q --properties-input --properties-output mm-p-1.in1 mm-p-1.in2 -o mm-p-1.out
43 test $? = 0 || { rm -fr $tmpfiles; exit 1; }
45 tmpfiles="$tmpfiles mm-p-1.ok"
46 cat << EOF > mm-p-1.ok
47 #: file3:102
48 still\ existing=translation
50 #: file4:10
51 !untranslated=
52 EOF
54 : ${DIFF=diff}
55 ${DIFF} mm-p-1.ok mm-p-1.out
56 result=$?
58 rm -fr $tmpfiles
60 exit $result