diff options
| author | 2021-03-31 18:10:17 -0400 | |
|---|---|---|
| committer | 2021-03-31 18:10:56 -0400 | |
| commit | f6692cf9d5bdaa72295436426ad4bf67d97aca7d (patch) | |
| tree | a0c74e499503b4821ac180900e549ea6aac61b0a /test | |
| parent | Merge pull request #34 from pyrmont/feature.netrepl-oob-tuples (diff) | |
Add `temple/compile` function
Diffstat (limited to 'test')
| -rw-r--r-- | test/suite8.janet | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/test/suite8.janet b/test/suite8.janet index 65f6ff9..2cdb843 100644 --- a/test/suite8.janet +++ b/test/suite8.janet @@ -30,4 +30,13 @@ </html> ```) +(def str-template "<html>hello {{ (args :arg) }}</html>") +(def render (temple/compile str-template)) +(def out (render :arg "world")) + +(test/assert (buffer? out) "Rendered temple string produces a buffer") + +(def expected "<html>hello world</html>") +(test/assert (= expected (string out)) "Rendered temple string produces \"hello world\"") + (test/end-suite) |
