1#!/bin/sh 2 3# Test Lisp support: --add-comments option. 4 5tmpfiles="" 6trap 'rm -fr $tmpfiles' 1 2 3 15 7 8tmpfiles="$tmpfiles xg-ls-2.lisp" 9cat <<\EOF > xg-ls-2.lisp 10#| a |# 11#| b |# (setq string #| c |# 12#| d |# 13#| e |# (_ #| f |# "hello world" #| g |# )) 14EOF 15 16tmpfiles="$tmpfiles xg-ls-2.tmp.po xg-ls-2.po" 17: ${XGETTEXT=xgettext} 18${XGETTEXT} --add-comments --omit-header --no-location --keyword=_ \ 19 -d xg-ls-2.tmp xg-ls-2.lisp 20test $? = 0 || { rm -fr $tmpfiles; exit 1; } 21tr -d '\r' < xg-ls-2.tmp.po > xg-ls-2.po 22test $? = 0 || { rm -fr $tmpfiles; exit 1; } 23 24tmpfiles="$tmpfiles xg-ls-2.ok" 25cat <<EOF > xg-ls-2.ok 26#. a 27#. b 28#. c 29#. d 30#. e 31#. f 32msgid "hello world" 33msgstr "" 34EOF 35 36: ${DIFF=diff} 37${DIFF} xg-ls-2.ok xg-ls-2.po 38result=$? 39 40rm -fr $tmpfiles 41 42exit $result 43