31 lines
555 B
Bash
31 lines
555 B
Bash
#!/bin/sh
|
|
|
|
# Test Shell support: backslashed double-quotes inside single-quotes.
|
|
|
|
tmpfiles=""
|
|
trap 'rm -fr $tmpfiles' 1 2 3 15
|
|
|
|
tmpfiles="$tmpfiles xg-sh-3.sh"
|
|
cat <<\EOF > xg-sh-3.sh
|
|
echo `gettext 'abc\"def'`
|
|
EOF
|
|
|
|
tmpfiles="$tmpfiles xg-sh-3.po"
|
|
: ${XGETTEXT=xgettext}
|
|
${XGETTEXT} --omit-header --no-location xg-sh-3.sh -d xg-sh-3
|
|
test $? = 0 || { rm -fr $tmpfiles; exit 1; }
|
|
|
|
tmpfiles="$tmpfiles xg-sh-3.ok"
|
|
cat <<\EOF > xg-sh-3.ok
|
|
msgid "abc\\\"def"
|
|
msgstr ""
|
|
EOF
|
|
|
|
: ${DIFF=diff}
|
|
${DIFF} xg-sh-3.ok xg-sh-3.po
|
|
result=$?
|
|
|
|
rm -fr $tmpfiles
|
|
|
|
exit $result
|