No empty .Rs/.Re
[netbsd-mini2440.git] / gnu / dist / gettext / gettext-tools / tests / xgettext-scheme-1
blob4bb2fe7844a9b88d122337f7bdb338a02e48ad34
1 #!/bin/sh
3 # Test Scheme support: --add-comments option.
5 tmpfiles=""
6 trap 'rm -fr $tmpfiles' 1 2 3 15
8 tmpfiles="$tmpfiles xg-sc-1.scm"
9 cat <<EOF > xg-sc-1.scm
10 ; This comment will not be extracted.
11 (display (_ "help"))
12 ;; TRANSLATORS: This is an extracted comment.
13 (display (_ "me"))
14 #! Not extracted either.
16 (display (_ "The Fabulous Four"))
17 EOF
19 tmpfiles="$tmpfiles xg-sc-1.po"
20 : ${XGETTEXT=xgettext}
21 ${XGETTEXT} -k_ --omit-header --no-location --add-comments=TRANSLATORS: \
22 xg-sc-1.scm -d xg-sc-1
23 test $? = 0 || { rm -fr $tmpfiles; exit 1; }
25 tmpfiles="$tmpfiles xg-sc-1.ok"
26 cat <<EOF > xg-sc-1.ok
27 msgid "help"
28 msgstr ""
30 #. TRANSLATORS: This is an extracted comment.
31 msgid "me"
32 msgstr ""
34 msgid "The Fabulous Four"
35 msgstr ""
36 EOF
38 : ${DIFF=diff}
39 ${DIFF} xg-sc-1.ok xg-sc-1.po
40 result=$?
42 rm -fr $tmpfiles
44 exit $result