summaryrefslogtreecommitdiffstats
path: root/gettext-tools/tests/sentence-1
diff options
context:
space:
mode:
Diffstat (limited to 'gettext-tools/tests/sentence-1')
-rwxr-xr-xgettext-tools/tests/sentence-1120
1 files changed, 120 insertions, 0 deletions
diff --git a/gettext-tools/tests/sentence-1 b/gettext-tools/tests/sentence-1
new file mode 100755
index 0000000..ac19afe
--- /dev/null
+++ b/gettext-tools/tests/sentence-1
@@ -0,0 +1,120 @@
+#! /bin/sh
+. "${srcdir=.}/init.sh"; path_prepend_ . ../src
+
+# Test of sentence handling.
+
+cat > s1.in <<\EOF
+1
+This is a primary sentence
+
+1
+This is a primary sentence.
+
+1
+This is a primary sentence.x
+
+2
+This is a primary sentence. This is a secondary sentence
+
+1
+This is a primary sentence. This is a secondary sentence
+
+1
+This is a primary sentence.' This is a secondary sentence
+
+3
+This is a primary sentence. This is a secondary sentence
+
+2
+This is a primary sentence.' This is a secondary sentence
+
+2
+This is a primary sentence.'x This is a secondary sentence
+
+2
+This is a primary sentence.''x This is a secondary sentence
+
+2
+This is a primary sentence.
+This is a secondary sentence
+
+2
+This is a primary sentence.
+This is a secondary sentence
+
+2
+This is a primary sentence. 
+This is a secondary sentence
+
+2
+This is a primary sentence. This is a secondary sentence
+
+2
+This is a primary sentence.' This is a secondary sentence
+
+2
+This is a primary sentence.'
+This is a secondary sentence
+
+EOF
+
+cat > s1.ok <<EOF
+FFFD
+
+
+2E
+.
+
+FFFD
+
+
+2E
+. This is a secondary sentence
+
+2E
+. This is a secondary sentence
+
+2E
+.' This is a secondary sentence
+
+FFFD
+
+
+2E
+.' This is a secondary sentence
+
+FFFD
+
+
+FFFD
+
+
+2E
+.
+This is a secondary sentence
+
+2E
+.
+This is a secondary sentence
+
+FFFD
+
+
+2E
+. This is a secondary sentence
+
+2E
+.' This is a secondary sentence
+
+2E
+.'
+This is a secondary sentence
+
+EOF
+
+../sentence-1-prg < s1.in > s1.out || exit 1
+
+: ${DIFF=diff}
+${DIFF} s1.ok s1.out || exit 1
+
+exit 0