Add continue-break test
This commit is contained in:
parent
e221a9b8b9
commit
de1de2b0e8
|
@ -0,0 +1,31 @@
|
||||||
|
<div>
|
||||||
|
|
||||||
|
<div>head</div>
|
||||||
|
|
||||||
|
<div>head</div>
|
||||||
|
|
||||||
|
<div>head</div>
|
||||||
|
|
||||||
|
<div>2</div>
|
||||||
|
|
||||||
|
<div>tail</div>
|
||||||
|
<div>head</div>
|
||||||
|
|
||||||
|
<div>3</div>
|
||||||
|
|
||||||
|
<div>tail</div>
|
||||||
|
<div>head</div>
|
||||||
|
|
||||||
|
<div>4</div>
|
||||||
|
|
||||||
|
<div>tail</div>
|
||||||
|
<div>head</div>
|
||||||
|
|
||||||
|
<div>5</div>
|
||||||
|
|
||||||
|
<div>tail</div>
|
||||||
|
<div>head</div>
|
||||||
|
|
||||||
|
<div>6</div>
|
||||||
|
|
||||||
|
</div>
|
|
@ -0,0 +1,9 @@
|
||||||
|
<div>
|
||||||
|
<% for i in 0..10 { %>
|
||||||
|
<div>head</div>
|
||||||
|
<% if i < 2 { continue; } %>
|
||||||
|
<div><%= i %></div>
|
||||||
|
<% if i > 5 { break; } %>
|
||||||
|
<div>tail</div>
|
||||||
|
<% } %>
|
||||||
|
</div>
|
|
@ -103,6 +103,15 @@ fn test_include() {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[derive(TemplateOnce)]
|
||||||
|
#[template(path = "continue-break.stpl", rm_whitespace = true)]
|
||||||
|
struct ContinueBreak;
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn continue_break() {
|
||||||
|
assert_render("continue-break", ContinueBreak);
|
||||||
|
}
|
||||||
|
|
||||||
#[derive(TemplateOnce)]
|
#[derive(TemplateOnce)]
|
||||||
#[template(path = "big-table.stpl", rm_whitespace = true)]
|
#[template(path = "big-table.stpl", rm_whitespace = true)]
|
||||||
struct BigTable {
|
struct BigTable {
|
||||||
|
|
Loading…
Reference in New Issue