style: Add a test for other valid uses of calc()

This commit is contained in:
Emilio Cobos Álvarez 2017-03-08 16:54:30 +01:00
parent dae17dcaf3
commit 20d0e71232
No known key found for this signature in database
GPG key ID: 056B727BB9C1027C

View file

@ -9,4 +9,7 @@ use style::values::specified::length::Length;
#[test]
fn test_calc() {
assert!(parse(Length::parse, "calc(1px+ 2px)").is_err());
assert!(parse(Length::parse, "calc( 1px + 2px )").is_ok());
assert!(parse(Length::parse, "calc(1px + 2px )").is_ok());
assert!(parse(Length::parse, "calc( 1px + 2px)").is_ok());
}