• Home
  • History
  • Annotate
  • Line#
  • Navigate
  • Raw
  • Download
  • only in /netgear-WNDR4500v2-V1.0.0.60_1.0.38/ap/gpl/timemachine/gettext-0.17/gettext-tools/tests/
1#! /bin/sh
2
3# Test handling of obsolete/untranslated messages with Java .properties syntax.
4
5tmpfiles=""
6trap 'rm -fr $tmpfiles' 1 2 3 15
7
8tmpfiles="$tmpfiles mm-p-1.in1 mm-p-1.in2"
9cat <<EOF > mm-p-1.in1
10#
11# def.po
12#
13#: file:100
14not\ existing=but with translation
15
16#: file2:101
17!not\ existing\ without\ translation=
18
19#: file3:102
20still\ existing=translation
21
22#
23# trailing comments should be removed
24EOF
25
26cat <<EOF > mm-p-1.in2
27#
28# ref.po
29#
30#: file3:102
31still\ existing=here is normally no comment
32
33#: file4:10
34!untranslated=
35
36#
37# trailing comments should be removed, even here
38EOF
39
40tmpfiles="$tmpfiles mm-p-1.tmp mm-p-1.out"
41: ${MSGMERGE=msgmerge}
42${MSGMERGE} -q --properties-input --properties-output -o mm-p-1.tmp mm-p-1.in1 mm-p-1.in2
43test $? = 0 || { rm -fr $tmpfiles; exit 1; }
44tr -d '\r' < mm-p-1.tmp > mm-p-1.out
45test $? = 0 || { rm -fr $tmpfiles; exit 1; }
46
47tmpfiles="$tmpfiles mm-p-1.ok"
48cat << EOF > mm-p-1.ok
49#: file3:102
50still\ existing=translation
51
52#: file4:10
53!untranslated=
54EOF
55
56: ${DIFF=diff}
57${DIFF} mm-p-1.ok mm-p-1.out
58result=$?
59
60rm -fr $tmpfiles
61
62exit $result
63