2 . "${srcdir=.}/init.sh"; path_prepend_ . ../src
4 # Test recognition of Qt plural format strings.
6 cat <<\EOF > f-qtp-1.data
7 # Unrecognized: no argument
9 # Unrecognized: unterminated
11 # Unrecognized: unterminated
19 # Valid: multiple uses of same argument
21 # Valid: an argument with locale-dependency flag
25 : ${XGETTEXT=xgettext}
27 while read comment; do
30 cat <<EOF > f-qtp-1-$n.in
33 ${XGETTEXT} -L C++ --qt -k_ -o f-qtp-1-$n.po f-qtp-1-$n.in || exit 1
34 test -f f-qtp-1-$n.po || exit 1
36 if echo "$comment" | grep 'Valid:' > /dev/null; then
37 if grep qt-plural-format f-qtp-1-$n.po > /dev/null; then
43 if grep qt-plural-format f-qtp-1-$n.po > /dev/null; then
49 if test -n "$fail"; then
50 echo "Format string recognition error:" 1>&2
51 cat f-qtp-1-$n.in 1>&2
53 cat f-qtp-1-$n.po 1>&2
56 rm -f f-qtp-1-$n.in f-qtp-1-$n.po