Add rust_macro test
This commit is contained in:
parent
6dea4793ab
commit
0612a28c50
|
@ -0,0 +1,2 @@
|
|||
|
||||
Some
|
|
@ -0,0 +1,5 @@
|
|||
<% if matches!(value, Some(_)) { %>
|
||||
Some
|
||||
<% } else { %>
|
||||
None
|
||||
<% } %>
|
|
@ -173,6 +173,17 @@ fn test_comment() {
|
|||
assert_render("comment", Comment{})
|
||||
}
|
||||
|
||||
#[derive(TemplateOnce)]
|
||||
#[template(path = "rust_macro.stpl", rm_whitespace = true)]
|
||||
struct RustMacro {
|
||||
value: Option<i32>,
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_rust_macro() {
|
||||
assert_render("rust_macro", RustMacro { value: Some(10) });
|
||||
}
|
||||
|
||||
#[cfg(unix)]
|
||||
mod unix {
|
||||
use super::*;
|
||||
|
|
Loading…
Reference in New Issue