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