tAdd another test - transliterate - Transliteration engine
HTML git clone git://lumidify.org/git/transliterate.git
DIR Log
DIR Files
DIR Refs
DIR README
DIR LICENSE
---
DIR commit df15f30a4f0f70756b5fb4dde9b188087105e973
DIR parent 4d2bba71bfcc746fc1adabcf7d0cc08d54652817
HTML Author: lumidify <nobody@lumidify.org>
Date: Thu, 26 Mar 2020 10:54:14 +0100
Add another test
Diffstat:
A tests/README | 4 ++++
M tests/alltests.sh | 1 +
A tests/test3/config | 18 ++++++++++++++++++
A tests/test3/descr.txt | 1 +
A tests/test3/err.txt | 3 +++
A tests/test3/expected.txt | 3 +++
A tests/test3/input.txt | 3 +++
7 files changed, 33 insertions(+), 0 deletions(-)
---
DIR diff --git a/tests/README b/tests/README
t@@ -0,0 +1,4 @@
+Run ./alltests.sh for all tests.
+
+There aren't very many tests here yet. Maybe I'll have
+time someday to test all the edge cases properly.
DIR diff --git a/tests/alltests.sh b/tests/alltests.sh
t@@ -2,3 +2,4 @@
./runtest.sh test1
./runtest.sh test2
+./runtest.sh test3
DIR diff --git a/tests/test3/config b/tests/test3/config
t@@ -0,0 +1,18 @@
+split "[ \n]+"
+beforeword " "
+afterword "[ \n]"
+tablesep ","
+choicesep "|"
+
+ignore "../data/ignore.txt"
+table words "../data/words1.txt"
+table endings "../data/endings_choices.txt"
+
+expand words other_name endings noroot
+
+match "w ord" "word" beginword nofinal
+matchignore "-d" endword
+
+group beginword endword
+replace other_name
+endgroup
DIR diff --git a/tests/test3/descr.txt b/tests/test3/descr.txt
t@@ -0,0 +1 @@
+matchignore only endword; expand noroot
DIR diff --git a/tests/test3/err.txt b/tests/test3/err.txt
t@@ -0,0 +1,3 @@
+Unknown word: "word0"
+Word "word1_replacedend1r1|word1_replacedend1r2" with 2 word choices.
+Unknown word: "-dword9end2"
DIR diff --git a/tests/test3/expected.txt b/tests/test3/expected.txt
t@@ -0,0 +1,3 @@
+ignore
+word0 word1_replacedend1r1|word1_replacedend1r2
+-dword9end2 word9_replacedend2r-d
DIR diff --git a/tests/test3/input.txt b/tests/test3/input.txt
t@@ -0,0 +1,3 @@
+ignore
+word0 word1end1
+-dword9end2 word9end2-d