mirror of
https://github.com/haml/haml.git
synced 2022-11-09 12:33:31 -05:00
[Sass] [SCSS] Test SassScript support.
This commit is contained in:
parent
d25716143a
commit
14acba9ca6
1 changed files with 36 additions and 0 deletions
|
@ -4,6 +4,42 @@ require File.dirname(__FILE__) + '/test_helper'
|
||||||
class ScssTest < Test::Unit::TestCase
|
class ScssTest < Test::Unit::TestCase
|
||||||
include ScssTestHelper
|
include ScssTestHelper
|
||||||
|
|
||||||
|
## Script
|
||||||
|
|
||||||
|
def test_variables
|
||||||
|
assert_equal <<CSS, render(<<SCSS)
|
||||||
|
blat {
|
||||||
|
a: foo; }
|
||||||
|
CSS
|
||||||
|
!var = "foo";
|
||||||
|
|
||||||
|
blat {a = !var}
|
||||||
|
SCSS
|
||||||
|
|
||||||
|
assert_equal <<CSS, render(<<SCSS)
|
||||||
|
foo {
|
||||||
|
a: 2; }
|
||||||
|
CSS
|
||||||
|
foo {
|
||||||
|
!var = 2;
|
||||||
|
a = !var; }
|
||||||
|
SCSS
|
||||||
|
end
|
||||||
|
|
||||||
|
def test_sass_script
|
||||||
|
assert_equal <<CSS, render(<<SCSS)
|
||||||
|
foo {
|
||||||
|
a: 3;
|
||||||
|
b: foobar;
|
||||||
|
c: 12px; }
|
||||||
|
CSS
|
||||||
|
foo {
|
||||||
|
a = 1 + 2;
|
||||||
|
b = "foo" + "bar";
|
||||||
|
c = floor(12.3px); }
|
||||||
|
SCSS
|
||||||
|
end
|
||||||
|
|
||||||
## Nested Rules
|
## Nested Rules
|
||||||
|
|
||||||
def test_nested_rules
|
def test_nested_rules
|
||||||
|
|
Loading…
Add table
Reference in a new issue