3 # Test of Shell support: bash $(...) syntax.
6 trap 'rm -fr $tmpfiles' 1 2 3 15
8 tmpfiles="$tmpfiles xg-sh-5.sh"
9 cat <<\EOF > xg-sh-5.sh
10 echo $(gettext 'Simple string')
11 echo "$(gettext 'Simple string inside double-quotes')"
12 echo $(gettext 'Simple decorated string: "x" \"y\"')
13 echo "$(gettext 'Simple decorated string: "x" \"y\" inside double-quotes')"
14 echo $(gettext "Simple dstring")
15 echo "$(gettext "Simple dstring inside double-quotes")"
16 echo $(gettext "Simple decorated dstring: \"x\" \\\"y\\\"")
17 echo "$(gettext "Simple decorated dstring: \"x\" \\\"y\\\" inside double-quotes")"
20 tmpfiles="$tmpfiles xg-sh-5.tmp.po xg-sh-5.po"
21 : ${XGETTEXT=xgettext}
22 ${XGETTEXT} --omit-header --no-location -d xg-sh-5.tmp xg-sh-5.sh
23 test $? = 0 || { rm -fr $tmpfiles; exit 1; }
24 LC_ALL=C tr -d '\r' < xg-sh-5.tmp.po > xg-sh-5.po
25 test $? = 0 || { rm -fr $tmpfiles; exit 1; }
27 tmpfiles="$tmpfiles xg-sh-5.ok"
28 cat <<\EOF > xg-sh-5.ok
32 msgid "Simple string inside double-quotes"
35 msgid "Simple decorated string: \"x\" \\\"y\\\""
38 msgid "Simple decorated string: \"x\" \\\"y\\\" inside double-quotes"
41 msgid "Simple dstring"
44 msgid "Simple dstring inside double-quotes"
47 msgid "Simple decorated dstring: \"x\" \\\"y\\\""
50 msgid "Simple decorated dstring: \"x\" \\\"y\\\" inside double-quotes"
55 ${DIFF} xg-sh-5.ok xg-sh-5.po