test: Add test for trim, lower and upper filters

This commit is contained in:
Kogia-sima 2020-12-17 19:54:21 +09:00
parent 8e07927f19
commit 06e34cf9d5
3 changed files with 15 additions and 0 deletions

View File

@ -0,0 +1,3 @@
trim: <html>
lower: abc
upper: ABC

View File

@ -0,0 +1,3 @@
trim: <%= " <html> " | trim %>
lower: <%= "aBc" | lower %>
upper: <%= "aBc" | upper %>

View File

@ -290,6 +290,15 @@ fn test_filter() {
assert_render("filter", Filter { message: "hello" });
}
#[derive(TemplateOnce)]
#[template(path = "filter2.stpl")]
struct Filter2;
#[test]
fn test_filter2() {
assert_render("filter2", Filter2);
}
#[cfg(unix)]
mod unix {
use super::*;