No empty .Rs/.Re
[netbsd-mini2440.git] / gnu / dist / gettext / gettext-tools / tests / xgettext-awk-1
blobc0422b9dfa639704bd777082cdc2fbe68dd42e10
1 #!/bin/sh
3 # Test awk support: --add-comments option.
5 tmpfiles=""
6 trap 'rm -fr $tmpfiles' 1 2 3 15
8 tmpfiles="$tmpfiles xg-a-1.awk"
9 cat <<EOF > xg-a-1.awk
10 # This comment will not be extracted.
11 print _"help"
12 # TRANSLATORS: This is an extracted comment.
13 print _"me"
14 # Not extracted either.
15 print _"Hey Jude"
16 # TRANSLATORS:
17 # Nickname of the Beatles
18 print _"The Fabulous Four"
19 EOF
21 tmpfiles="$tmpfiles xg-a-1.po"
22 : ${XGETTEXT=xgettext}
23 ${XGETTEXT} --omit-header --no-location --add-comments=TRANSLATORS: \
24 xg-a-1.awk -d xg-a-1
25 test $? = 0 || { rm -fr $tmpfiles; exit 1; }
27 tmpfiles="$tmpfiles xg-a-1.ok"
28 cat <<EOF > xg-a-1.ok
29 msgid "help"
30 msgstr ""
32 #. TRANSLATORS: This is an extracted comment.
33 msgid "me"
34 msgstr ""
36 msgid "Hey Jude"
37 msgstr ""
39 #. TRANSLATORS:
40 #. Nickname of the Beatles
41 msgid "The Fabulous Four"
42 msgstr ""
43 EOF
45 : ${DIFF=diff}
46 ${DIFF} xg-a-1.ok xg-a-1.po
47 result=$?
49 rm -fr $tmpfiles
51 exit $result