• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#! /bin/sh
2. "${srcdir=.}/init.sh"; path_prepend_ . ../src
3
4# Test handling of obsolete/untranslated messages with Java .properties syntax.
5
6cat <<EOF > mm-p-1.in1
7#
8# def.po
9#
10#: file:100
11not\ existing=but with translation
12
13#: file2:101
14!not\ existing\ without\ translation=
15
16#: file3:102
17still\ existing=translation
18
19#
20# trailing comments should be removed
21EOF
22
23cat <<EOF > mm-p-1.in2
24#
25# ref.po
26#
27#: file3:102
28still\ existing=here is normally no comment
29
30#: file4:10
31!untranslated=
32
33#
34# trailing comments should be removed, even here
35EOF
36
37: ${MSGMERGE=msgmerge}
38${MSGMERGE} -q --properties-input --properties-output -o mm-p-1.tmp mm-p-1.in1 mm-p-1.in2 || Exit 1
39LC_ALL=C tr -d '\r' < mm-p-1.tmp > mm-p-1.out || Exit 1
40
41cat << EOF > mm-p-1.ok
42#: file3:102
43still\ existing=translation
44
45#: file4:10
46!untranslated=
47EOF
48
49: ${DIFF=diff}
50${DIFF} mm-p-1.ok mm-p-1.out
51result=$?
52
53exit $result
54