diff options
Diffstat (limited to 'tests/text.nom')
| -rw-r--r-- | tests/text.nom | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/text.nom b/tests/text.nom new file mode 100644 index 0000000..ea18d42 --- /dev/null +++ b/tests/text.nom @@ -0,0 +1,13 @@ +#.. + Tests for the stuff defined in lib/text.nom + +use "lib/core.nom" + +assume ((["x","y"] joined with ",") = "x,y") or barf "joined with failed" +assume ((["x","y"] joined) = "xy") or barf "joined failed" +assume (("asdf" capitalized) = "Asdf") or barf "capitalized failed" +assume (("asdf" with "X" instead of "s") = "aXdf") or barf "substitution failed" +# TODO: add tests for indent/dedent +assume ("\n" = (newline)) or barf "Text literals failed." +%x <- "\(green)hello\(reset color)" +assume (("x" + "y") = "xy") |
