1 #! /bin/sh 2 3 # Test C support: --trigraphs option. 4 5 tmpfiles="" 6 trap 'rm -fr $tmpfiles' 1 2 3 15 7 8 tmpfiles="$tmpfiles xg-c-4.in.c" 9 cat <<EOF > xg-c-4.in.c 10 main()??<printf(gettext("Hello, " "World!" "??/n")); ??> 11 EOF 12 13 tmpfiles="$tmpfiles xg-c-4.po" 14 : ${XGETTEXT=xgettext} 15 ${XGETTEXT} --omit-header --no-location --trigraphs -d xg-c-4 xg-c-4.in.c 16 test $? = 0 || { rm -fr $tmpfiles; exit 1; } 17 18 tmpfiles="$tmpfiles xg-c-4.ok" 19 cat <<EOF > xg-c-4.ok 20 #, c-format 21 msgid "Hello, World!\n" 22 msgstr "" 23 EOF 24 25 : ${DIFF=diff} 26 ${DIFF} xg-c-4.ok xg-c-4.po 27 result=$? 28 29 rm -fr $tmpfiles 30 31 exit $result 32