1
0
Fork 0
mirror of https://github.com/haml/haml.git synced 2022-11-09 12:33:31 -05:00

Added tests to assert an error is raised about incompatible units when comparing numbers using >, <, <=, and >=.

This commit is contained in:
Chris Eppstein 2009-07-03 14:18:16 -07:00
parent de6efe861e
commit 09bc753ba9

View file

@ -33,6 +33,10 @@ class SassEngineTest < Test::Unit::TestCase
"! a" => 'Invalid variable: "! a".', "! a" => 'Invalid variable: "! a".',
"!a b" => 'Invalid variable: "!a b".', "!a b" => 'Invalid variable: "!a b".',
"!a = 1b + 2c" => "Incompatible units: 'c' and 'b'.", "!a = 1b + 2c" => "Incompatible units: 'c' and 'b'.",
"!a = 1b < 2c" => "Incompatible units: 'c' and 'b'.",
"!a = 1b > 2c" => "Incompatible units: 'c' and 'b'.",
"!a = 1b <= 2c" => "Incompatible units: 'c' and 'b'.",
"!a = 1b >= 2c" => "Incompatible units: 'c' and 'b'.",
"a\n :b= 1b * 2c" => "2b*c isn't a valid CSS value.", "a\n :b= 1b * 2c" => "2b*c isn't a valid CSS value.",
"a\n :b= 1b % 2c" => "Cannot modulo by a number with units: 2c.", "a\n :b= 1b % 2c" => "Cannot modulo by a number with units: 2c.",
"!a = 2px + #ccc" => "Cannot add a number with units (2px) to a color (#cccccc).", "!a = 2px + #ccc" => "Cannot add a number with units (2px) to a color (#cccccc).",