1#!/bin/sh 2 3# Test of Shell support: bash $(...) syntax. 4 5tmpfiles="" 6trap 'rm -fr $tmpfiles' 1 2 3 15 7 8tmpfiles="$tmpfiles xg-sh-5.sh" 9cat <<\EOF > xg-sh-5.sh 10echo $(gettext 'Simple string') 11echo "$(gettext 'Simple string inside double-quotes')" 12echo $(gettext 'Simple decorated string: "x" \"y\"') 13echo "$(gettext 'Simple decorated string: "x" \"y\" inside double-quotes')" 14echo $(gettext "Simple dstring") 15echo "$(gettext "Simple dstring inside double-quotes")" 16echo $(gettext "Simple decorated dstring: \"x\" \\\"y\\\"") 17echo "$(gettext "Simple decorated dstring: \"x\" \\\"y\\\" inside double-quotes")" 18EOF 19 20tmpfiles="$tmpfiles xg-sh-5.po" 21: ${XGETTEXT=xgettext} 22${XGETTEXT} --omit-header --no-location -d xg-sh-5 xg-sh-5.sh 23test $? = 0 || { rm -fr $tmpfiles; exit 1; } 24 25tmpfiles="$tmpfiles xg-sh-5.ok" 26cat <<\EOF > xg-sh-5.ok 27msgid "Simple string" 28msgstr "" 29 30msgid "Simple string inside double-quotes" 31msgstr "" 32 33msgid "Simple decorated string: \"x\" \\\"y\\\"" 34msgstr "" 35 36msgid "Simple decorated string: \"x\" \\\"y\\\" inside double-quotes" 37msgstr "" 38 39msgid "Simple dstring" 40msgstr "" 41 42msgid "Simple dstring inside double-quotes" 43msgstr "" 44 45msgid "Simple decorated dstring: \"x\" \\\"y\\\"" 46msgstr "" 47 48msgid "Simple decorated dstring: \"x\" \\\"y\\\" inside double-quotes" 49msgstr "" 50EOF 51 52: ${DIFF=diff} 53${DIFF} xg-sh-5.ok xg-sh-5.po 54result=$? 55 56rm -fr $tmpfiles 57 58exit $result 59