• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#! /bin/sh
2. "${srcdir=.}/init.sh"; path_prepend_ . ../src
3
4# Test PO extractors with multiple input files.
5
6cat <<EOF > xg-po-2-1.po
7msgid "first msgid"
8msgid_plural "first msgid (plural)"
9msgstr[0] ""
10msgstr[1] ""
11
12msgid "second msgid"
13msgid_plural "second msgid (plural)"
14msgstr[0] ""
15msgstr[1] ""
16EOF
17
18cat <<EOF > xg-po-2-2.po
19msgid "third msgid"
20msgid_plural "third msgid (plural)"
21msgstr[0] ""
22msgstr[1] ""
23
24msgid "second msgid"
25msgid_plural "second msgid (plural)"
26msgstr[0] ""
27msgstr[1] ""
28EOF
29
30: ${XGETTEXT=xgettext}
31${XGETTEXT} --omit-header xg-po-2-1.po xg-po-2-2.po -o xg-po-2.tmp.po || Exit 1
32LC_ALL=C tr -d '\r' < xg-po-2.tmp.po > xg-po-2.po || Exit 1
33
34cat <<EOF > xg-po-2.ok
35msgid "first msgid"
36msgid_plural "first msgid (plural)"
37msgstr[0] ""
38msgstr[1] ""
39
40msgid "second msgid"
41msgid_plural "second msgid (plural)"
42msgstr[0] ""
43msgstr[1] ""
44
45msgid "third msgid"
46msgid_plural "third msgid (plural)"
47msgstr[0] ""
48msgstr[1] ""
49EOF
50
51: ${DIFF=diff}
52${DIFF} xg-po-2.ok xg-po-2.po
53result=$?
54
55exit $result
56