summaryrefslogtreecommitdiffstats
path: root/gettext-tools/tests/xgettext-tcl-3
blob: 2593e6aaf72b6f68aa75091d0d2dcb7dc944ade3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#!/bin/sh
. "${srcdir=.}/init.sh"; path_prepend_ . ../src

# Test Tcl support: --add-comments option.

cat <<\EOF > xg-t-3.tcl
# a
set string [_ "hello world" # b
] # c
EOF

: ${XGETTEXT=xgettext}
${XGETTEXT} --add-comments --omit-header --no-location --keyword=_ \
  -d xg-t-3.tmp xg-t-3.tcl || exit 1
LC_ALL=C tr -d '\r' < xg-t-3.tmp.po > xg-t-3.po || exit 1

cat <<EOF > xg-t-3.ok
#. a
msgid "hello world"
msgstr ""
EOF

: ${DIFF=diff}
${DIFF} xg-t-3.ok xg-t-3.po
result=$?

exit $result