summaryrefslogtreecommitdiffstats
path: root/tests/msgcomm-3
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2001-05-02 22:00:59 +0000
committerBruno Haible <bruno@clisp.org>2001-05-02 22:00:59 +0000
commit80e44904a6eabf2530b99a0c863610e2d22c1a76 (patch)
tree4061c58bd21a72501d44932fd45df22212c54192 /tests/msgcomm-3
parent89ab1419ac6f1d8b6d83eaf12d5546f15dfd0ab1 (diff)
downloadexternal_gettext-80e44904a6eabf2530b99a0c863610e2d22c1a76.zip
external_gettext-80e44904a6eabf2530b99a0c863610e2d22c1a76.tar.gz
external_gettext-80e44904a6eabf2530b99a0c863610e2d22c1a76.tar.bz2
New tests, from Karl Eichwalder.
Diffstat (limited to 'tests/msgcomm-3')
-rwxr-xr-xtests/msgcomm-343
1 files changed, 43 insertions, 0 deletions
diff --git a/tests/msgcomm-3 b/tests/msgcomm-3
new file mode 100755
index 0000000..aec22d0
--- /dev/null
+++ b/tests/msgcomm-3
@@ -0,0 +1,43 @@
+#! /bin/sh
+
+# Test --omit-header option when there is no header.
+
+tmpfiles=""
+trap 'rm -fr $tmpfiles' 1 2 3 15
+
+tmpfiles="mcomm-test3.in1 mcomm-test3.in2"
+cat <<EOF > mcomm-test3.in1
+#: first.c:123
+msgid "1"
+msgstr "1x"
+EOF
+
+cat <<EOF > mcomm-test3.in2
+#: hunt.c:759
+msgid "2"
+msgstr "2x"
+EOF
+
+tmpfiles="$tmpfiles mcomm-test3.out"
+: ${MSGCOMM=msgcomm}
+${MSGCOMM} --more-than=0 --omit-header -o mcomm-test3.out \
+ mcomm-test3.in1 mcomm-test3.in2
+
+tmpfiles="$tmpfiles mcomm-test3.ok"
+cat << EOF > mcomm-test3.ok
+#: first.c:123
+msgid "1"
+msgstr "1x"
+
+#: hunt.c:759
+msgid "2"
+msgstr "2x"
+EOF
+
+: ${DIFF=diff}
+${DIFF} mcomm-test3.ok mcomm-test3.out
+result=$?
+
+rm -fr $tmpfiles
+
+exit $result