Imported Upstream version 0.19.7
[platform/upstream/gettext.git] / gettext-tools / tests / xgettext-sh-3
1 #!/bin/sh
2 . "${srcdir=.}/init.sh"; path_prepend_ . ../src
3
4 # Test Shell support: backslashed double-quotes inside single-quotes
5 # and ANSI-C quoting.
6
7 cat <<\EOF > xg-sh-3.sh
8 echo `gettext 'abc\"def'`
9 echo `gettext $'\'\"\a\b\e\f\n\r\t\v\x61\x3a\x3A\075\\'`
10 EOF
11
12 : ${XGETTEXT=xgettext}
13 ${XGETTEXT} --omit-header --no-location -d xg-sh-3.tmp xg-sh-3.sh || exit 1
14 LC_ALL=C tr -d '\r' < xg-sh-3.tmp.po > xg-sh-3.po || exit 1
15
16 cat <<\EOF > xg-sh-3.ok
17 msgid "abc\\\"def"
18 msgstr ""
19
20 msgid ""
21 "'\"\a\b\e\f\n"
22 "\r\t\va::=\\"
23 msgstr ""
24 EOF
25
26 : ${DIFF=diff}
27 ${DIFF} xg-sh-3.ok xg-sh-3.po
28 result=$?
29
30 exit $result