Skip to content
Snippets Groups Projects
Commit 4701b06c authored by ilor's avatar ilor
Browse files

example data tests w/doc

parent f6b8b24b
Branches
No related merge requests found
Data tests example
Everything above the first '---' line (three dashes) is not a testcase. Lines of the form a=b ae checked for special name=value lines, such as tagset=NAME which sets the tagset or sentence=NAME which load a sentence.
After the --- line comes the first test -- the operator string, followed by an empty line, followed by the expected string output. The operator string can be multiline.
If the first operator line is "position=XXX", position is parsed as an int and that is used as the current position in the sentence for this and any following tests. Default position is 0.
Tests are separated from one another by a --- line.
This test loads no sentence, but can change the position anyway. Tagset is kipi by default.
tagset=ikipi
---
equal(["aaa"], "aaa")
True
---
lower(["A"])
["a"]
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment