Imported Upstream version 0.19.7
[platform/upstream/gettext.git] / gettext-tools / tests / msguniq-7
1 #! /bin/sh
2 . "${srcdir=.}/init.sh"; path_prepend_ . ../src
3
4 # Test --add-location=file option.
5
6 cat <<\EOF > msguniq-7.in
7 #: foo:1
8 msgid "foo"
9 msgstr ""
10
11 #: bar:1
12 msgid "foo"
13 msgstr ""
14 EOF
15
16 : ${MSGUNIQ-msguniq}
17 ${MSGUNIQ} --add-location=file -o msguniq-7.tmp msguniq-7.in || exit 1
18 LC_ALL=C tr -d '\r' < msguniq-7.tmp > msguniq-7.out || exit 1
19
20 cat <<\EOF > msguniq-7.ok
21 #: foo bar
22 msgid "foo"
23 msgstr ""
24 EOF
25
26 : ${DIFF=diff}
27 ${DIFF} msguniq-7.ok msguniq-7.out
28 result=$?
29
30 exit $result