• Home
  • History
  • Annotate
  • Line#
  • Navigate
  • Raw
  • Download
  • only in /netgear-WNDR4500-V1.0.1.40_1.0.68/ap/gpl/timemachine/gettext-0.17/gettext-tools/tests/
1#! /bin/sh
2
3# Test C support: --trigraphs option.
4
5tmpfiles=""
6trap 'rm -fr $tmpfiles' 1 2 3 15
7
8tmpfiles="$tmpfiles xg-c-4.in.c"
9cat <<EOF > xg-c-4.in.c
10main()??<printf(gettext("Hello, " "World!" "??/n")); ??>
11EOF
12
13tmpfiles="$tmpfiles xg-c-4.tmp.po xg-c-4.po"
14: ${XGETTEXT=xgettext}
15${XGETTEXT} --omit-header --no-location --trigraphs -d xg-c-4.tmp xg-c-4.in.c
16test $? = 0 || { rm -fr $tmpfiles; exit 1; }
17tr -d '\r' < xg-c-4.tmp.po > xg-c-4.po
18test $? = 0 || { rm -fr $tmpfiles; exit 1; }
19
20tmpfiles="$tmpfiles xg-c-4.ok"
21cat <<EOF > xg-c-4.ok
22#, c-format
23msgid "Hello, World!\n"
24msgstr ""
25EOF
26
27: ${DIFF=diff}
28${DIFF} xg-c-4.ok xg-c-4.po
29result=$?
30
31rm -fr $tmpfiles
32
33exit $result
34