summaryrefslogtreecommitdiffstats
path: root/gettext-tools/tests/xgettext-sh-3
blob: a0e90850e6fd7e3617cd11a9b1b219026441d5fd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/bin/sh
. "${srcdir=.}/init.sh"; path_prepend_ . ../src

# Test Shell support: backslashed double-quotes inside single-quotes.

cat <<\EOF > xg-sh-3.sh
echo `gettext 'abc\"def'`
EOF

: ${XGETTEXT=xgettext}
${XGETTEXT} --omit-header --no-location -d xg-sh-3.tmp xg-sh-3.sh || exit 1
LC_ALL=C tr -d '\r' < xg-sh-3.tmp.po > xg-sh-3.po || exit 1

cat <<\EOF > xg-sh-3.ok
msgid "abc\\\"def"
msgstr ""
EOF

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

exit $result