summaryrefslogtreecommitdiffstats
path: root/gettext-tools/tests/msgcomm-21
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2003-02-14 15:36:34 +0000
committerBruno Haible <bruno@clisp.org>2009-06-23 12:09:49 +0200
commit9519b3162d1daaf97dd1a2dbf74b202b8ee25302 (patch)
treef744aad7355b5c56a8feb4f1ab142bb373b0d285 /gettext-tools/tests/msgcomm-21
parent2e05ea9878df9c6d904b890c2e19cfc1a7422311 (diff)
downloadexternal_gettext-9519b3162d1daaf97dd1a2dbf74b202b8ee25302.zip
external_gettext-9519b3162d1daaf97dd1a2dbf74b202b8ee25302.tar.gz
external_gettext-9519b3162d1daaf97dd1a2dbf74b202b8ee25302.tar.bz2
Move tests/msgcomm-21 to gettext-tools/tests/msgcomm-21.
Diffstat (limited to 'gettext-tools/tests/msgcomm-21')
-rwxr-xr-xgettext-tools/tests/msgcomm-2146
1 files changed, 46 insertions, 0 deletions
diff --git a/gettext-tools/tests/msgcomm-21 b/gettext-tools/tests/msgcomm-21
new file mode 100755
index 0000000..f97ddd5
--- /dev/null
+++ b/gettext-tools/tests/msgcomm-21
@@ -0,0 +1,46 @@
+#! /bin/sh
+
+# Test --more-than=0; identical message are wanted once only.
+# If both occurrences are fuzzy, keep the fuzzy mark.
+
+tmpfiles=""
+trap 'rm -fr $tmpfiles' 1 2 3 15
+
+tmpfiles="$tmpfiles mcomm-test21.in1 mcomm-test21.in2"
+cat <<EOF > mcomm-test21.in1
+# Not sure.
+#: first.c:123
+#, fuzzy
+msgid "1"
+msgstr "1x"
+EOF
+
+cat <<EOF > mcomm-test21.in2
+# Doubt.
+#: hunt.c:759
+#, fuzzy
+msgid "1"
+msgstr "1x"
+EOF
+
+tmpfiles="$tmpfiles mcomm-test21.out"
+: ${MSGCOMM=msgcomm}
+${MSGCOMM} --more-than=0 mcomm-test21.in1 mcomm-test21.in2 -o mcomm-test21.out
+test $? = 0 || { rm -fr $tmpfiles; exit 1; }
+
+tmpfiles="$tmpfiles mcomm-test21.ok"
+cat << EOF > mcomm-test21.ok
+# Not sure.
+#: first.c:123 hunt.c:759
+#, fuzzy
+msgid "1"
+msgstr "1x"
+EOF
+
+: ${DIFF=diff}
+${DIFF} mcomm-test21.ok mcomm-test21.out
+result=$?
+
+rm -fr $tmpfiles
+
+exit $result