summaryrefslogtreecommitdiff
path: root/gettext-tools/tests/msgcomm-20
diff options
context:
space:
mode:
authorLorry Tar Creator <lorry-tar-importer@baserock.org>2014-12-24 07:38:37 +0000
committer <>2015-02-02 12:02:29 +0000
commit482840e61f86ca321838a91e902c41d40c098bbb (patch)
tree01ea2e242fd2792d19fe192476601587901db794 /gettext-tools/tests/msgcomm-20
downloadgettext-tarball-482840e61f86ca321838a91e902c41d40c098bbb.tar.gz
Imported from /home/lorry/working-area/delta_gettext-tarball/gettext-0.19.4.tar.xz.gettext-0.19.4
Diffstat (limited to 'gettext-tools/tests/msgcomm-20')
-rwxr-xr-xgettext-tools/tests/msgcomm-2038
1 files changed, 38 insertions, 0 deletions
diff --git a/gettext-tools/tests/msgcomm-20 b/gettext-tools/tests/msgcomm-20
new file mode 100755
index 0000000..69b2ff1
--- /dev/null
+++ b/gettext-tools/tests/msgcomm-20
@@ -0,0 +1,38 @@
+#! /bin/sh
+. "${srcdir=.}/init.sh"; path_prepend_ . ../src
+
+# Test --more-than=0; identical message are wanted once only.
+# If the first occurrence is not fuzzy, don't make the result fuzzy.
+
+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
+
+: ${MSGCOMM=msgcomm}
+${MSGCOMM} --more-than=0 -o mcomm-test20.tmp \
+ mcomm-test20.in1 mcomm-test20.in2 || exit 1
+LC_ALL=C tr -d '\r' < mcomm-test20.tmp > mcomm-test20.out || exit 1
+
+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=$?
+
+exit $result