Skip to content

Commit

Permalink
Add a little more test code to improve coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
athos committed Aug 19, 2020
1 parent b840ed9 commit fdc5a85
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
4 changes: 4 additions & 0 deletions test-resources/templates/demo.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@
<li><a href="{{url}}">{{name}}</a></li>
{{/link}}
{{/items}}
{{!
these lines
must be ignored
!}}

{{#empty}}
<p>The list is empty.</p>
Expand Down
9 changes: 8 additions & 1 deletion test/pogonos/core_test.cljc
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,14 @@

#?(:clj
(deftest render-test
(is (= (pg/render (pg/parse-resource demo-file) data)
(is (= "<h1>Colors</h1>
<li><strong>red</strong></li>
<li><a href=\"#Green\">green</a></li>
<li><a href=\"#Blue\">blue</a></li>
"
(pg/render (pg/parse-resource demo-file) data)
(pg/render-string (slurp (io/resource demo-file)) data)
(pg/render-file (io/as-file (io/resource demo-file)) data)
(pg/render-resource demo-file data)))))
Expand Down

0 comments on commit fdc5a85

Please sign in to comment.