diff options
Diffstat (limited to 'testing/tests/matches.rs')
-rw-r--r-- | testing/tests/matches.rs | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/testing/tests/matches.rs b/testing/tests/matches.rs index 8f4b05c..9fae70c 100644 --- a/testing/tests/matches.rs +++ b/testing/tests/matches.rs @@ -82,3 +82,15 @@ fn test_match_custom_enum() { let s = MatchCustomEnumTemplate { color: Color::Rgb(160, 0, 255) }; assert_eq!(s.render().unwrap(), "\n\nColorful: #A000FF\n"); } + +#[derive(Template)] +#[template(path = "match-no-ws.html")] +struct MatchNoWhitespace { + foo: Option<usize>, +} + +#[test] +fn test_match_no_whitespace() { + let s = MatchNoWhitespace { foo: Some(1) }; + assert_eq!(s.render().unwrap(), "1"); +} |