Add 'include-nest' test
This commit is contained in:
parent
7d77b755c6
commit
4b1fd92488
|
@ -0,0 +1,7 @@
|
|||
1
|
||||
2
|
||||
INCLUDED: foo
|
||||
|
||||
3
|
||||
|
||||
4
|
|
@ -0,0 +1,3 @@
|
|||
1
|
||||
<% include!("/includes/include-parent.stpl"); %>
|
||||
4
|
|
@ -0,0 +1,3 @@
|
|||
2
|
||||
<% include!("../included.stpl"); %>
|
||||
3
|
|
@ -84,3 +84,14 @@ struct Include<'a> {
|
|||
fn test_include() {
|
||||
assert_render("include", Include { strs: &["foo", "bar"] });
|
||||
}
|
||||
|
||||
#[derive(TemplateOnce)]
|
||||
#[template(path = "include-nest.stpl")]
|
||||
struct IncludeNest<'a> {
|
||||
s: &'a str,
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_include_nest() {
|
||||
assert_render("include-nest", IncludeNest { s: "foo" });
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue