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.po"
46
: ${XGETTEXT=xgettext}
47
${XGETTEXT} --omit-header -n xg-pr-1.in.properties \
48
xg-pr-1.c xg-pr-1.cc -d xg-pr-1
49
test $? = 0 || { rm -fr $tmpfiles; exit 1; }
51
tmpfiles="$tmpfiles xg-pr-1.ok"
52
cat <<EOF > xg-pr-1.ok
56
msgstr "some text to get fuzzy copied to result"
65
msgstr "Again some text for fuzzy"
78
${DIFF} xg-pr-1.ok xg-pr-1.po