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

[Sass] Add a test for properties with content and nested properties.

This commit is contained in:
Nathan Weizenbaum 2009-10-13 13:34:09 -07:00
parent 97b9dd8378
commit b000a4631e

View file

@ -27,7 +27,7 @@ class SassEngineTest < Test::Unit::TestCase
"a\n b: c;" => 'Invalid property: "b: c;" (no ";" required at end-of-line).',
"a\n b : c" => 'Invalid property: "b : c".',
"a\n b=c: d" => 'Invalid property: "b=c: d".',
":a" => 'Properties aren\'t allowed at the root of a document.',
"a: b" => 'Properties aren\'t allowed at the root of a document.',
"!" => 'Invalid variable: "!".',
"!a" => 'Invalid variable: "!a".',
"! a" => 'Invalid variable: "! a".',
@ -463,6 +463,18 @@ SASS
assert_equal("foo {\n a: b;\n c: d;\n e: f; }\n", render("foo\r a: b\r\n c: d\n\r e: f"))
end
def test_property_with_content_and_nested_props
assert_equal(<<CSS, render(<<SASS))
foo {
a: b;
a-c: d; }
CSS
foo
a: b
c: d
SASS
end
def test_or_eq
assert_equal("foo {\n a: b; }\n", render(%Q{!foo = "b"\n!foo ||= "c"\nfoo\n a = !foo}))
assert_equal("foo {\n a: b; }\n", render(%Q{!foo ||= "b"\nfoo\n a = !foo}))