3 # Test checking of Qt format strings.
6 trap 'rm -fr $tmpfiles' 1 2 3 15
8 tmpfiles
="$tmpfiles f-qt-2.data"
9 cat <<\EOF
> f-qt-2.data
10 # Valid: %% doesn't count
13 # Invalid: invalid msgstr
16 # Valid: same arguments
22 # Invalid: too few arguments
25 # Invalid: too many arguments
28 # Invalid: missing non-final argument
31 # Invalid: added non-final argument
38 while read comment
; do
42 tmpfiles
="$tmpfiles f-qt-2-$n.po f-qt-2-$n.mo"
43 cat <<EOF > f-qt-2-$n.po
49 if echo "$comment" |
grep 'Valid:' > /dev
/null
; then
50 if ${MSGFMT} --check-format -o f-qt-2-
$n.mo f-qt-2-
$n.po
; then
56 ${MSGFMT} --check-format -o f-qt-2-
$n.mo f-qt-2-
$n.po
2> /dev
/null
63 if test -n "$fail"; then
64 echo "Format string checking error:" 1>&2
68 rm -f f-qt-2-
$n.po f-qt-2-
$n.mo