+2001-06-23 Bruno Haible <haible@clisp.cons.org>
+
+ * msgcomm-18: New file, from Karl Eichwalder with modifications.
+ * msgcomm-19: New file, from Karl Eichwalder with modifications.
+ * msgcomm-20: New file, from Karl Eichwalder with modifications.
+ * msgcomm-21: New file, from Karl Eichwalder with modifications.
+ * Makefile.am (TESTS): Add them.
+
2001-06-23 Bruno Haible <haible@clisp.cons.org>
* msgcomm-17: New file, from Karl Eichwalder.
msgcmp-1 msgcmp-2 \
msgcomm-1 msgcomm-2 msgcomm-3 msgcomm-4 msgcomm-5 msgcomm-6 msgcomm-7 \
msgcomm-8 msgcomm-9 msgcomm-10 msgcomm-11 msgcomm-12 msgcomm-13 \
- msgcomm-14 msgcomm-15 msgcomm-16 msgcomm-17 \
+ msgcomm-14 msgcomm-15 msgcomm-16 msgcomm-17 msgcomm-18 msgcomm-19 \
+ msgcomm-20 msgcomm-21 \
msgfmt-1 msgfmt-2 msgfmt-3 msgfmt-4 msgfmt-5 \
msgmerge-1 msgmerge-2 msgmerge-3 msgmerge-4 msgmerge-5 msgmerge-6 \
msgmerge-7 msgmerge-8 msgmerge-9 msgmerge-10 msgmerge-11 \
--- /dev/null
+#! /bin/sh
+
+# Test --more-than=0; identical message are wanted once only.
+
+tmpfiles=""
+trap 'rm -fr $tmpfiles' 1 2 3 15
+
+tmpfiles="mcomm-test18.in1 mcomm-test18.in2"
+cat <<EOF > mcomm-test18.in1
+# Sure.
+#: first.c:123
+msgid "1"
+msgstr "1x"
+EOF
+
+cat <<EOF > mcomm-test18.in2
+# Right.
+#: hunt.c:759
+msgid "1"
+msgstr "1x"
+EOF
+
+tmpfiles="$tmpfiles mcomm-test18.out"
+: ${MSGCOMM=msgcomm}
+${MSGCOMM} --more-than=0 mcomm-test18.in1 mcomm-test18.in2 -o mcomm-test18.out
+
+tmpfiles="$tmpfiles mcomm-test18.ok"
+cat << EOF > mcomm-test18.ok
+# Sure.
+#: first.c:123 hunt.c:759
+msgid "1"
+msgstr "1x"
+EOF
+
+: ${DIFF=diff}
+${DIFF} mcomm-test18.ok mcomm-test18.out
+result=$?
+
+rm -fr $tmpfiles
+
+exit $result
--- /dev/null
+#! /bin/sh
+
+# Test --more-than=0; identical message are wanted once only.
+# If the first occurrence is fuzzy, keep the fuzzy mark.
+
+tmpfiles=""
+trap 'rm -fr $tmpfiles' 1 2 3 15
+
+tmpfiles="mcomm-test19.in1 mcomm-test19.in2"
+cat <<EOF > mcomm-test19.in1
+# Not sure.
+#: first.c:123
+#, fuzzy
+msgid "1"
+msgstr "1x"
+EOF
+
+cat <<EOF > mcomm-test19.in2
+# Sure.
+#: hunt.c:759
+msgid "1"
+msgstr "1x"
+EOF
+
+tmpfiles="$tmpfiles mcomm-test19.out"
+: ${MSGCOMM=msgcomm}
+${MSGCOMM} --more-than=0 mcomm-test19.in1 mcomm-test19.in2 -o mcomm-test19.out
+
+tmpfiles="$tmpfiles mcomm-test19.ok"
+cat << EOF > mcomm-test19.ok
+# Not sure.
+#: first.c:123 hunt.c:759
+#, fuzzy
+msgid "1"
+msgstr "1x"
+EOF
+
+: ${DIFF=diff}
+${DIFF} mcomm-test19.ok mcomm-test19.out
+result=$?
+
+rm -fr $tmpfiles
+
+exit $result
--- /dev/null
+#! /bin/sh
+
+# Test --more-than=0; identical message are wanted once only.
+# If the first occurrence is not fuzzy, don't make the result fuzzy.
+
+tmpfiles=""
+trap 'rm -fr $tmpfiles' 1 2 3 15
+
+tmpfiles="mcomm-test20.in1 mcomm-test20.in2"
+cat <<EOF > mcomm-test20.in1
+# Sure.
+#: first.c:123
+msgid "1"
+msgstr "1x"
+EOF
+
+cat <<EOF > mcomm-test20.in2
+# Not sure.
+#: hunt.c:759
+#, fuzzy
+msgid "1"
+msgstr "1x"
+EOF
+
+tmpfiles="$tmpfiles mcomm-test20.out"
+: ${MSGCOMM=msgcomm}
+${MSGCOMM} --more-than=0 -o mcomm-test20.out \
+ mcomm-test20.in1 mcomm-test20.in2
+
+tmpfiles="$tmpfiles mcomm-test20.ok"
+cat << EOF > mcomm-test20.ok
+# Sure.
+#: first.c:123 hunt.c:759
+msgid "1"
+msgstr "1x"
+EOF
+
+: ${DIFF=diff}
+${DIFF} mcomm-test20.ok mcomm-test20.out
+result=$?
+
+rm -fr $tmpfiles
+
+exit $result
--- /dev/null
+#! /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="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
+
+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