diff --git a/rinja_derive/src/tests.rs b/rinja_derive/src/tests.rs index 2ef24157a..57e36ec44 100644 --- a/rinja_derive/src/tests.rs +++ b/rinja_derive/src/tests.rs @@ -407,6 +407,22 @@ match ( "{% if y is defined && !(y) %}bla{% endif %}", r#"if *(&(!(self.y)) as &::core::primitive::bool) { writer.write_str("bla")?; +}"#, + &[("y", "bool")], + 3, + ); + compare( + "{% if y is not defined || !y %}bla{% endif %}", + r#"if *(&(!self.y) as &::core::primitive::bool) { + writer.write_str("bla")?; +}"#, + &[("y", "bool")], + 3, + ); + compare( + "{% if y is not defined || !(y) %}bla{% endif %}", + r#"if *(&(!(self.y)) as &::core::primitive::bool) { + writer.write_str("bla")?; }"#, &[("y", "bool")], 3,