Skip to content

Commit bc17d7e

Browse files
committed
test: add case for #487
1 parent 44c1e5a commit bc17d7e

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

src/partial.rs

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -451,4 +451,26 @@ name: there
451451
"#
452452
);
453453
}
454+
455+
#[test]
456+
fn test_nested_partial() {
457+
let mut hb = Registry::new();
458+
hb.register_template_string("partial", "{{> @partial-block}}")
459+
.unwrap();
460+
hb.register_template_string(
461+
"index",
462+
r#"{{#>partial}}
463+
Yo
464+
{{#>partial}}
465+
Yo 2
466+
{{/partial}}
467+
{{/partial}}"#,
468+
)
469+
.unwrap();
470+
assert_eq!(
471+
r#" Yo
472+
Yo 2"#,
473+
hb.render("index", &()).unwrap()
474+
);
475+
}
454476
}

0 commit comments

Comments
 (0)