Add -lm dependency for gettextlib to fix LTO build
[platform/upstream/gettext.git] / gettext-tools / tests / xgettext-sh-6
1 #!/bin/sh
2 . "${srcdir=.}/init.sh"; path_prepend_ . ../src
3
4 # Test Shell support: --add-comments option.
5
6 cat <<\EOF > xg-sh-6.sh
7 # a
8 _ "hello world" # b
9 EOF
10
11 : ${XGETTEXT=xgettext}
12 ${XGETTEXT} --add-comments --omit-header --no-location --keyword=_ \
13   -d xg-sh-6.tmp xg-sh-6.sh || exit 1
14 LC_ALL=C tr -d '\r' < xg-sh-6.tmp.po > xg-sh-6.po || exit 1
15
16 cat <<EOF > xg-sh-6.ok
17 #. a
18 msgid "hello world"
19 msgstr ""
20 EOF
21
22 : ${DIFF=diff}
23 ${DIFF} xg-sh-6.ok xg-sh-6.po
24 result=$?
25
26 exit $result