3 # Test recognition of Qt plural format strings.
6 trap 'rm -fr $tmpfiles' 1 2 3 15
8 tmpfiles="$tmpfiles f-qtp-1.data"
9 cat <<\EOF > f-qtp-1.data
10 # Unrecognized: no argument
12 # Unrecognized: unterminated
14 # Unrecognized: unterminated
22 # Valid: multiple uses of same argument
24 # Valid: an argument with locale-dependency flag
28 : ${XGETTEXT=xgettext}
30 while read comment; do
33 tmpfiles="$tmpfiles f-qtp-1-$n.in f-qtp-1-$n.po"
34 cat <<EOF > f-qtp-1-$n.in
37 ${XGETTEXT} -L C++ --qt -k_ -o f-qtp-1-$n.po f-qtp-1-$n.in || exit 1
38 test -f f-qtp-1-$n.po || exit 1
40 if echo "$comment" | grep 'Valid:' > /dev/null; then
41 if grep qt-plural-format f-qtp-1-$n.po > /dev/null; then
47 if grep qt-plural-format f-qtp-1-$n.po > /dev/null; then
53 if test -n "$fail"; then
54 echo "Format string recognition error:" 1>&2
55 cat f-qtp-1-$n.in 1>&2
57 cat f-qtp-1-$n.po 1>&2
60 rm -f f-qtp-1-$n.in f-qtp-1-$n.po