Skip to content

Commit

Permalink
Add sample file exercising partial parameters.
Browse files Browse the repository at this point in the history
  • Loading branch information
mkantor committed Jan 2, 2022
1 parent 9278a3d commit ce29435
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions samples/partials/abcd.html.hbs
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{{~> ab.html.hbs}}{{> subdirectory/c.html.hbs}}{{> echo-target-media-type.html.hbs target-media-type="d"}}{{!--
it is possible to set custom parameters for included templates, and they
may override render data usually set by Operator
--}}
1 change: 1 addition & 0 deletions samples/partials/echo-target-media-type.html.hbs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{{~target-media-type~}}
3 changes: 3 additions & 0 deletions tests/snapshots/integration_tests__partials.snap
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
---
source: tests/integration_tests.rs
assertion_line: 52
expression: contents
input_file: samples/partials

---
a.html.hbs: "a\n"
ab.html.hbs: "a\nb\n"
abc.html.hbs: "a\nb\nc\n\nsubdirectory entries:\n/subdirectory/c\n"
abcd.html.hbs: "a\nb\nc\nd"
b.html: "b\n"
echo-target-media-type.html.hbs: text/html
subdirectory.html.hbs: "subdirectory entries:\n/subdirectory/c\n"
subdirectory/c.html.hbs: "c\n"

0 comments on commit ce29435

Please sign in to comment.