Files
gf-rgl/unittest
Inari Listenmaa 4c02a6c6d1 (unittest) Add option to only use cc, never parse
Usage like before, but add -only-cc as one of the arguments. For example:

`python3 unittest/unittest.py src/somali/unittest/vp.gftest -only-cc`

In order for it to work, the test file has to only contain test cases like this:

```
LangSom: isku BIND ma barto
Lang: PhrUtt NoPConj (UttS (UseCl (TTAnt TPres ASimul) PNeg (PredVP (UsePron youSg_Pron) (ReflVP (SlashV2a teach_V2))))) NoVoc
```

&+ needs to be written as BIND.
2019-08-11 14:34:55 +02:00
..

Python script for unit testing RGL grammars

Usage

python path-to-script.py path/to/testfile.gftest (...)

The script must be located in a sibling directory to the RGL src directory to work properly.

Test format

The test file should look something like this:

LangSwe: jag sover i huset
LangEng: I sleep in the house

LangSwe: huset verkar stort
Lang: PhrUtt NoPConj (UttS (UseCl (TTAnt TPres ASimul) PPos (PredVP ...

This contains two tests: Every test should be separated by empty lines. Every line starts with a language, followed by ":" and the sentence (or the abstract syntax tree if the abstract grammar is specified).

You can also see an example in the file unittest-example.gftest.