• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#! /bin/sh
2. "${srcdir=.}/init.sh"; path_prepend_ . ../src
3
4# Test handling of comments.
5
6cat <<EOF > mm-test4.in1.po
7msgid "one"
8msgstr "eins"
9# This comment should be copied.
10msgid "two"
11msgstr "zwei"
12
13
14# And this one, too.
15#~ msgid "four"
16#~ msgstr "vier"
17EOF
18
19cat <<EOF > mm-test4.in2.po
20msgid "one"
21msgstr ""
22# This is a comment in the POT file.
23msgid "three"
24msgstr ""
25EOF
26
27: ${MSGMERGE=msgmerge}
28${MSGMERGE} -q -o mm-test4.tmp mm-test4.in1.po mm-test4.in2.po || Exit 1
29LC_ALL=C tr -d '\r' < mm-test4.tmp > mm-test4.out || Exit 1
30
31cat <<EOF > mm-test4.ok
32msgid "one"
33msgstr "eins"
34
35# This is a comment in the POT file.
36msgid "three"
37msgstr ""
38
39# This comment should be copied.
40#~ msgid "two"
41#~ msgstr "zwei"
42
43# And this one, too.
44#~ msgid "four"
45#~ msgstr "vier"
46EOF
47
48: ${DIFF=diff}
49${DIFF} mm-test4.ok mm-test4.out
50result=$?
51
52exit $result
53