diff options
author | Sébastien Dailly <sebastien@chimrod.com> | 2021-09-05 19:41:40 +0200 |
---|---|---|
committer | Sébastien Dailly <sebastien@chimrod.com> | 2021-09-05 19:41:40 +0200 |
commit | 6a34154b77ac80f89df816ba0062f382d915fb22 (patch) | |
tree | 5dab18f15fe8555d5369a9c492228f6aa4d23001 /src/test | |
parent | 853e281a6719125866f8b948540944c571b091c6 (diff) |
Updated tests
Diffstat (limited to 'src/test')
-rw-r--r-- | src/test/test.ml | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/src/test/test.ml b/src/test/test.ml index 2964127..060e829 100644 --- a/src/test/test.ml +++ b/src/test/test.ml @@ -8,6 +8,11 @@ let process (optional_line : string option) expected = | None -> () | Some line -> match T.Reader.process line with + | exception _ -> + error := 1; + Printf.fprintf stdout + "%s : error \n%!" + line | Error result -> error := 1; Printf.fprintf stdout @@ -46,6 +51,8 @@ let tests = ; "abaissées", "abEse(s)" ; "abaissera", "abEs2Ra" ; "achat", "aSa(t)" + ; "agneau", "aNo" + ; "aimes", "Em°(s)" ; "aiment", "Em°(t)" ; "anniversaire", "anivERsER°" ; "anta", "@ta" @@ -69,14 +76,16 @@ let tests = ; "co|incidant", "ko5sid@(t)" ; "croire", "kR[wa]R°" ; "demeure", "d2m9R°" + ; "diag|nostic", "diagnostik" ; "ébrouas", "ebRua(s)" - ; "effroi", "EfRwa" + ; "effroi", "EfR[wa]" ; "em|magasinais","@magazinE(s)" ; "essai", "EsE" ; "extra", "EkstRa" ; "famille", "famij°" + ; "feuille", "f9j°" ; "final", "finaL" - ; "loin", "Lw5" + ; "loin", "L[w5]" ; "groin", "gR[w5]" ; "hirondelle", "iR§dEL°" ; "joues", "Zu°(s)" @@ -96,18 +105,20 @@ let tests = ; "platte", "pLat°" ; "soin", "sw5" ; "souris", "suRi(s)" - ; "toiture", "twatyR°" + ; "toiture", "t[wa]tyR°" ; "trois", "tR[wa](s)" - ; "veillons", "vEj§(s)" ; "vil|le", "viLL°" ; "wèb", "wEb" ] let () = + let n = ref 0 in let () = List.iter tests ~f:(fun (input, expected) -> + incr n; repeat (Lexing.from_string input) expected) in + Printf.printf "Runned %d tests. Got %d errors\n" (!n) (!error); exit !error |