• 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 --omit-header option when there is no header.
4
5tmpfiles=""
6trap 'rm -fr $tmpfiles' 1 2 3 15
7
8tmpfiles="$tmpfiles mcomm-test3.in1 mcomm-test3.in2"
9cat <<EOF > mcomm-test3.in1
10#: first.c:123
11msgid "1"
12msgstr "1x"
13EOF
14
15cat <<EOF > mcomm-test3.in2
16#: hunt.c:759
17msgid "2"
18msgstr "2x"
19EOF
20
21tmpfiles="$tmpfiles mcomm-test3.tmp mcomm-test3.out"
22: ${MSGCOMM=msgcomm}
23${MSGCOMM} --more-than=0 --omit-header -o mcomm-test3.tmp \
24    mcomm-test3.in1 mcomm-test3.in2
25test $? = 0 || { rm -fr $tmpfiles; exit 1; }
26tr -d '\r' < mcomm-test3.tmp > mcomm-test3.out
27test $? = 0 || { rm -fr $tmpfiles; exit 1; }
28
29tmpfiles="$tmpfiles mcomm-test3.ok"
30cat << EOF > mcomm-test3.ok
31#: first.c:123
32msgid "1"
33msgstr "1x"
34
35#: hunt.c:759
36msgid "2"
37msgstr "2x"
38EOF
39
40: ${DIFF=diff}
41${DIFF} mcomm-test3.ok mcomm-test3.out
42result=$?
43
44rm -fr $tmpfiles
45
46exit $result
47