2 . "${srcdir=.}/init.sh"; path_prepend_ . ../src
4 # Test checking of YCP format strings.
6 cat <<\EOF > f-y-2.data
7 # Valid: %% doesn't count
10 # Invalid: invalid msgstr
13 # Valid: same arguments
19 # Invalid: too few arguments
22 # Invalid: too many arguments
25 # Invalid: missing non-final argument
28 # Invalid: added non-final argument
35 while read comment; do
39 cat <<EOF > f-y-2-$n.po
45 if echo "$comment" | grep 'Valid:' > /dev/null; then
46 if ${MSGFMT} --check-format -o f-y-2-$n.mo f-y-2-$n.po; then
52 ${MSGFMT} --check-format -o f-y-2-$n.mo f-y-2-$n.po 2> /dev/null
59 if test -n "$fail"; then
60 echo "Format string checking error:" 1>&2
64 rm -f f-y-2-$n.po f-y-2-$n.mo