2 . "${srcdir=.}/init.sh"; path_prepend_ . ../src
4 # Test wrapping long lines.
5 # Both msgid and location comments should wrap at the same column.
7 cat <<\EOF > xg-test13.c
8 /* With --width=30, the following 10 gettext calls will produce:
10 #: x:1 x:2 x:3 x:4 x:5 x:6 x:7
14 because strlen("#:") + strlen(" x:N") * 7 = 30. */
27 /* And the following gettext call will produce:
30 "x:1 x:2 x:3 x:4 x:5 x:6 x:7 "
33 because strlen("\"") + strlen("x:N ") * 7 + strlen("\"") = 30. */
34 gettext ("x:1 x:2 x:3 x:4 x:5 x:6 x:7 x:8 x:9 x:10");
37 : ${XGETTEXT=xgettext}
38 ${XGETTEXT} --omit-header --add-location --width=30 -d xg-test13.tmp \
40 LC_ALL=C tr -d '\r' < xg-test13.tmp.po > xg-test13.po || exit 1
42 cat <<\EOF > xg-test13.ok
43 #: x:1 x:2 x:3 x:4 x:5 x:6 x:7
50 "x:1 x:2 x:3 x:4 x:5 x:6 x:7 "
56 ${DIFF} xg-test13.ok xg-test13.po