Add test for type ascription in let expressions

This commit is contained in:
Chris Wong 2017-07-30 21:08:14 +12:00
parent 24d46d5db4
commit cf403b3f6e

View file

@ -156,3 +156,13 @@ fn let_lexical_scope() {
"Twilight thought I had 99 cupcakes, ",
"but I only had 42."));
}
#[test]
fn let_type_ascription() {
let s = html! {
@let x: u32 = 42 {
"I have " (x) " cupcakes!"
}
}.into_string();
assert_eq!(s, "I have 42 cupcakes!");
}