No empty .Rs/.Re
[netbsd-mini2440.git] / gnu / dist / gettext / gettext-tools / tests / xgettext-smalltalk-1
blob6695590862eb7ff0137434346be26a4efa0b26c4
1 #!/bin/sh
3 # Test Smalltalk support: --add-comments option.
5 tmpfiles=""
6 trap 'rm -fr $tmpfiles' 1 2 3 15
8 tmpfiles="$tmpfiles xg-st-1.st"
9 cat <<EOF > xg-st-1.st
10 "This comment will not be extracted."
11 Transcript showCr: (NLS ? 'help').
12 " TRANSLATORS: This is an extracted comment."
13 Transcript showCr: (NLS ? 'me').
14 "Not extracted either."
15 Transcript showCr: (NLS ? 'Hey Jude').
16 "TRANSLATORS:
17 Nickname of the Beatles
19 Transcript showCr: (NLS ? 'The Fabulous Four').
20 EOF
22 tmpfiles="$tmpfiles xg-st-1.po"
23 : ${XGETTEXT=xgettext}
24 ${XGETTEXT} --omit-header --no-location --add-comments=TRANSLATORS: \
25 xg-st-1.st -d xg-st-1
26 test $? = 0 || { rm -fr $tmpfiles; exit 1; }
28 tmpfiles="$tmpfiles xg-st-1.ok"
29 cat <<EOF > xg-st-1.ok
30 msgid "help"
31 msgstr ""
33 #. TRANSLATORS: This is an extracted comment.
34 msgid "me"
35 msgstr ""
37 msgid "Hey Jude"
38 msgstr ""
40 #. TRANSLATORS:
41 #. Nickname of the Beatles
43 msgid "The Fabulous Four"
44 msgstr ""
45 EOF
47 : ${DIFF=diff}
48 ${DIFF} xg-st-1.ok xg-st-1.po
49 result=$?
51 rm -fr $tmpfiles
53 exit $result