sailfish/sailfish-tests/integration-tests/tests/fails/template_not_found.rs

18 lines
389 B
Rust
Raw Normal View History

2024-03-11 17:33:11 -04:00
use sailfish::RenderOnce;
use sailfish_macros::RenderOnce;
2024-03-11 17:33:11 -04:00
#[derive(RenderOnce)]
#[template(path = "empty.stpl")]
struct ExistTemplate;
2024-03-11 17:33:11 -04:00
#[derive(RenderOnce)]
#[template(path = "not_exist.stpl")]
struct NotExistTemplate {
2024-03-11 17:33:11 -04:00
var: usize,
}
fn main() {
println!("{}", ExistTemplate.render_once().unwrap());
println!("{}", NotExistTemplate { var: 1996 }.render_once().unwrap());
}