summaryrefslogtreecommitdiffstats
path: root/gettext-tools/tests/xgettext-ycp-3
blob: 51a7feb3d00494512ce5d5ae75e4f8bb0636f8dc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#!/bin/sh

# Test YCP support: string literal concatenation.

tmpfiles=""
trap 'rm -fr $tmpfiles' 1 2 3 15

tmpfiles="$tmpfiles xg-y-3.ycp"
cat <<\EOF > xg-y-3.ycp
print (_("John\n"
"Paul\n"
"George and "
"Ringo"));
EOF

tmpfiles="$tmpfiles xg-y-3.po"
: ${XGETTEXT=xgettext}
${XGETTEXT} --omit-header --no-location -d xg-y-3 xg-y-3.ycp
test $? = 0 || { rm -fr $tmpfiles; exit 1; }

tmpfiles="$tmpfiles xg-y-3.ok"
cat <<\EOF > xg-y-3.ok
msgid ""
"John\n"
"Paul\n"
"George and Ringo"
msgstr ""
EOF

: ${DIFF=diff}
${DIFF} xg-y-3.ok xg-y-3.po
result=$?

rm -fr $tmpfiles

exit $result