3 # Test C, C++, JavaProperties extractors.
6 trap 'rm -fr $tmpfiles' 1 2 3 15
8 tmpfiles="$tmpfiles xg-pr-1.in.properties xg-pr-1.c xg-pr-1.cc"
9 cat <<EOF > xg-pr-1.in.properties
12 !extract\ me=some text to get fuzzy copied to result
19 !hello=Again some text for fuzzy
26 main (int argc, char *argv[])
28 printf (dcgettext ("hello", "Hello, world."));
33 cat <<EOF > xg-pr-1.cc
38 main (int argc, char *argv[])
40 cout << dcgettext ("hello", "Hello world!", LC_MESSAGES) << endl;
45 tmpfiles="$tmpfiles xg-pr-1.tmp.po xg-pr-1.po"
46 : ${XGETTEXT=xgettext}
47 ${XGETTEXT} --omit-header -n \
48 -d xg-pr-1.tmp xg-pr-1.in.properties xg-pr-1.c xg-pr-1.cc
49 test $? = 0 || { rm -fr $tmpfiles; exit 1; }
50 LC_ALL=C tr -d '\r' < xg-pr-1.tmp.po > xg-pr-1.po
51 test $? = 0 || { rm -fr $tmpfiles; exit 1; }
53 tmpfiles="$tmpfiles xg-pr-1.ok"
54 cat <<EOF > xg-pr-1.ok
58 msgstr "some text to get fuzzy copied to result"
67 msgstr "Again some text for fuzzy"
80 ${DIFF} xg-pr-1.ok xg-pr-1.po