2 . "${srcdir=.}/init.sh"; path_prepend_ . ../src
4 # Test checking of Python format strings.
6 cat <<\EOF > f-lu-2.data
7 # Valid: %% doesn't count
10 # Invalid: invalid msgstr
13 # Valid: same arguments, with different widths
16 # Invalid: too few arguments
19 # Invalid: too many arguments
22 # Valid: type compatibility
25 # Valid: type compatibility
28 # Valid: type compatibility
31 # Valid: type compatibility
34 # Valid: type compatibility
37 # Valid: type compatibility
40 # Valid: type compatibility
43 # Valid: type compatibility
46 # Valid: type compatibility
49 # Invalid: type incompatibility
52 # Invalid: type incompatibility
55 # Invalid: type incompatibility
58 # Invalid: type incompatibility
61 # Invalid: type incompatibility
64 # Invalid: type incompatibility
67 # Invalid: type incompatibility
70 # Invalid: type incompatibility
73 # Invalid: type incompatibility
76 # Invalid: type incompatibility
79 # Invalid: type incompatibility
86 while read comment; do
90 cat <<EOF > f-lu-2-$n.po
96 if echo "$comment" | grep 'Valid:' > /dev/null; then
97 if ${MSGFMT} --check-format -o f-lu-2-$n.mo f-lu-2-$n.po; then
103 ${MSGFMT} --check-format -o f-lu-2-$n.mo f-lu-2-$n.po 2> /dev/null
110 if test -n "$fail"; then
111 echo "Format string checking error:" 1>&2
112 cat f-lu-2-$n.po 1>&2
115 rm -f f-lu-2-$n.po f-lu-2-$n.mo