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