• 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 --update: location changed, and xgettext comment added. Both changes
4# must be reflected in the resulting PO file. With Java .properties syntax.
5
6tmpfiles=""
7trap 'rm -fr $tmpfiles' 1 2 3 15
8
9tmpfiles="$tmpfiles mm-p-2.po"
10cat <<\EOF > mm-p-2.po
11#: cogarithmetic.cc:12
12white=wei\u00df
13EOF
14
15tmpfiles="$tmpfiles mm-p-2.pot"
16cat <<EOF > mm-p-2.pot
17#. location changed
18#: cogarithmetic.cc:33
19!white=
20EOF
21
22tmpfiles="$tmpfiles mm-p-2.po~ mm-p-2.tmp"
23: ${MSGMERGE=msgmerge}
24${MSGMERGE} -q --properties-input --update mm-p-2.po mm-p-2.pot
25test $? = 0 || { rm -fr $tmpfiles; exit 1; }
26mv mm-p-2.po mm-p-2.tmp || { rm -fr $tmpfiles; exit 1; }
27tr -d '\r' < mm-p-2.tmp > mm-p-2.po
28test $? = 0 || { rm -fr $tmpfiles; exit 1; }
29
30tmpfiles="$tmpfiles mm-p-2.ok"
31cat <<\EOF > mm-p-2.ok
32#. location changed
33#: cogarithmetic.cc:33
34white=wei\u00df
35EOF
36
37: ${DIFF=diff}
38${DIFF} mm-p-2.ok mm-p-2.po
39result=$?
40
41rm -fr $tmpfiles
42
43exit $result
44