Add test for rm_whitespace option
This commit is contained in:
parent
61ff466976
commit
7324165ab0
|
@ -0,0 +1,13 @@
|
||||||
|
<div>
|
||||||
|
<span>1</span>
|
||||||
|
<span>2</span>
|
||||||
|
<span>3</span>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
trailing spaces
|
||||||
|
This line should be appeared under the previous line
|
||||||
|
</div>
|
||||||
|
<div>foo</div>
|
||||||
|
|
||||||
|
<div>bar</div>
|
||||||
|
|
|
@ -0,0 +1,13 @@
|
||||||
|
<div>
|
||||||
|
<span>1</span>
|
||||||
|
<span>2</span>
|
||||||
|
|
||||||
|
<span>3</span>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
trailing spaces
|
||||||
|
This line should be appeared under the previous line
|
||||||
|
</div>
|
||||||
|
<% for msg in messages { %>
|
||||||
|
<div><%= msg %></div>
|
||||||
|
<% } %>
|
|
@ -142,6 +142,18 @@ fn test_teams() {
|
||||||
assert_render("teams", teams);
|
assert_render("teams", teams);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[derive(TemplateOnce)]
|
||||||
|
#[template(path = "rm_whitespace.stpl")]
|
||||||
|
#[template(rm_whitespace = true)]
|
||||||
|
struct RmWhitespace<'a, 'b> {
|
||||||
|
messages: &'a [&'b str],
|
||||||
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn test_rm_whitespace() {
|
||||||
|
assert_render("rm_whitespace", RmWhitespace { messages: &["foo", "bar"] });
|
||||||
|
}
|
||||||
|
|
||||||
#[cfg(unix)]
|
#[cfg(unix)]
|
||||||
mod unix {
|
mod unix {
|
||||||
use super::*;
|
use super::*;
|
||||||
|
|
Loading…
Reference in New Issue