From 20d0e71232717c59c64f2537b184d9ef670554f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emilio=20Cobos=20=C3=81lvarez?= Date: Wed, 8 Mar 2017 16:54:30 +0100 Subject: [PATCH] style: Add a test for other valid uses of calc() --- tests/unit/style/parsing/length.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/unit/style/parsing/length.rs b/tests/unit/style/parsing/length.rs index a76f26d826b..eda3b3425e3 100644 --- a/tests/unit/style/parsing/length.rs +++ b/tests/unit/style/parsing/length.rs @@ -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()); }