• Home
  • History
  • Annotate
  • Line#
  • Navigate
  • Raw
  • Download
  • only in /netgear-WNDR4500-V1.0.1.40_1.0.68/ap/gpl/timemachine/gettext-0.17/gettext-tools/tests/
1#! /bin/sh
2
3# Test --no-location option when there is a header.
4
5tmpfiles=""
6trap 'rm -fr $tmpfiles' 1 2 3 15
7
8tmpfiles="$tmpfiles mcomm-test6.in1 mcomm-test6.in2"
9cat <<EOF > mcomm-test6.in1
10msgid ""
11msgstr ""
12"Project-Id-Version: GNU one 1.2.3\n"
13"POT-Creation-Date: 2000-12-11 20:49+0100\n"
14"PO-Revision-Date: 2000-03-18 15:25+01:00\n"
15"Last-Translator: Karl Eichwalder <ke@suse.de>\n"
16"Language-Team: German <de@li.org>\n"
17"MIME-Version: 1.0\n"
18"Content-Type: text/plain; charset=iso-8859-1\n"
19"Content-Transfer-Encoding: 8bit\n"
20
21#: first.c:123
22msgid "1"
23msgstr "1x"
24EOF
25
26cat <<EOF > mcomm-test6.in2
27#: hunt.c:759
28msgid "2"
29msgstr "2x"
30EOF
31
32tmpfiles="$tmpfiles mcomm-test6.tmp mcomm-test6.out"
33: ${MSGCOMM=msgcomm}
34${MSGCOMM} --more-than=0 --no-location -o mcomm-test6.tmp \
35    mcomm-test6.in1 mcomm-test6.in2
36test $? = 0 || { rm -fr $tmpfiles; exit 1; }
37tr -d '\r' < mcomm-test6.tmp > mcomm-test6.out
38test $? = 0 || { rm -fr $tmpfiles; exit 1; }
39
40tmpfiles="$tmpfiles mcomm-test6.ok"
41cat << EOF > mcomm-test6.ok
42msgid ""
43msgstr ""
44"Project-Id-Version: GNU one 1.2.3\n"
45"POT-Creation-Date: 2000-12-11 20:49+0100\n"
46"PO-Revision-Date: 2000-03-18 15:25+01:00\n"
47"Last-Translator: Karl Eichwalder <ke@suse.de>\n"
48"Language-Team: German <de@li.org>\n"
49"MIME-Version: 1.0\n"
50"Content-Type: text/plain; charset=iso-8859-1\n"
51"Content-Transfer-Encoding: 8bit\n"
52
53msgid "1"
54msgstr "1x"
55
56msgid "2"
57msgstr "2x"
58EOF
59
60: ${DIFF=diff}
61${DIFF} mcomm-test6.ok mcomm-test6.out
62result=$?
63
64rm -fr $tmpfiles
65
66exit $result
67