Add -lm dependency for gettextlib to fix LTO build
[platform/upstream/gettext.git] / gettext-tools / tests / msgcomm-21
1 #! /bin/sh
2 . "${srcdir=.}/init.sh"; path_prepend_ . ../src
3
4 # Test --more-than=0; identical message are wanted once only.
5 # If both occurrences are fuzzy, keep the fuzzy mark.
6
7 cat <<EOF > mcomm-test21.in1
8 # Not sure.
9 #: first.c:123
10 #, fuzzy
11 msgid "1"
12 msgstr "1x"
13 EOF
14
15 cat <<EOF > mcomm-test21.in2
16 # Doubt.
17 #: hunt.c:759
18 #, fuzzy
19 msgid "1"
20 msgstr "1x"
21 EOF
22
23 : ${MSGCOMM=msgcomm}
24 ${MSGCOMM} --more-than=0 -o mcomm-test21.tmp mcomm-test21.in1 mcomm-test21.in2 || exit 1
25 LC_ALL=C tr -d '\r' < mcomm-test21.tmp > mcomm-test21.out || exit 1
26
27 cat << EOF > mcomm-test21.ok
28 # Not sure.
29 #: first.c:123 hunt.c:759
30 #, fuzzy
31 msgid "1"
32 msgstr "1x"
33 EOF
34
35 : ${DIFF=diff}
36 ${DIFF} mcomm-test21.ok mcomm-test21.out
37 result=$?
38
39 exit $result