Imported Upstream version 0.19.7
[platform/upstream/gettext.git] / gettext-tools / tests / xgettext-lisp-2
1 #!/bin/sh
2 . "${srcdir=.}/init.sh"; path_prepend_ . ../src
3
4 # Test Lisp support: --add-comments option.
5
6 cat <<\EOF > xg-ls-2.lisp
7 #| a |#
8 #| b |# (setq string #| c |#
9 #| d |#
10 #| e |# (_ #| f |# "hello world" #| g |# ))
11 EOF
12
13 : ${XGETTEXT=xgettext}
14 ${XGETTEXT} --add-comments --omit-header --no-location --keyword=_ \
15   -d xg-ls-2.tmp xg-ls-2.lisp || exit 1
16 LC_ALL=C tr -d '\r' < xg-ls-2.tmp.po > xg-ls-2.po || exit 1
17
18 cat <<EOF > xg-ls-2.ok
19 #. a
20 #. b
21 #. c
22 #. d
23 #. e
24 #. f
25 msgid "hello world"
26 msgstr ""
27 EOF
28
29 : ${DIFF=diff}
30 ${DIFF} xg-ls-2.ok xg-ls-2.po
31 result=$?
32
33 exit $result