]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
New msgcomm tests.
authorBruno Haible <bruno@clisp.org>
Sat, 23 Jun 2001 22:04:44 +0000 (22:04 +0000)
committerBruno Haible <bruno@clisp.org>
Sat, 23 Jun 2001 22:04:44 +0000 (22:04 +0000)
tests/ChangeLog
tests/Makefile.am
tests/msgcomm-18 [new file with mode: 0755]
tests/msgcomm-19 [new file with mode: 0755]
tests/msgcomm-20 [new file with mode: 0755]
tests/msgcomm-21 [new file with mode: 0755]

index aab71629794279c6e89e18e4dc82175a5efa5479..2b6512fa819a31c6bbd80bd67e082c06e63a0a96 100644 (file)
@@ -1,3 +1,11 @@
+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.
index edae809550a62d9e80b8564ff4386ff4f45f9801..fce856decb96288670ac19bf298060d73fd28327 100644 (file)
@@ -23,7 +23,8 @@ TESTS = gettext-1 gettext-2 \
        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 \
diff --git a/tests/msgcomm-18 b/tests/msgcomm-18
new file mode 100755 (executable)
index 0000000..aa5382c
--- /dev/null
@@ -0,0 +1,41 @@
+#! /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
diff --git a/tests/msgcomm-19 b/tests/msgcomm-19
new file mode 100755 (executable)
index 0000000..65b7c62
--- /dev/null
@@ -0,0 +1,44 @@
+#! /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
diff --git a/tests/msgcomm-20 b/tests/msgcomm-20
new file mode 100755 (executable)
index 0000000..0274190
--- /dev/null
@@ -0,0 +1,44 @@
+#! /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
diff --git a/tests/msgcomm-21 b/tests/msgcomm-21
new file mode 100755 (executable)
index 0000000..ad85544
--- /dev/null
@@ -0,0 +1,45 @@
+#! /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