forked from sensational/sassphp
-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
0.5.12 Expand out map root & map path tests
- Loading branch information
1 parent
0418cf3
commit 9552f14
Showing
5 changed files
with
111 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
--TEST-- | ||
correctly handles getting source map path | ||
--SKIPIF-- | ||
<?php if (!extension_loaded("sass")) print "skip"; ?> | ||
--FILE-- | ||
<?php | ||
|
||
$sass = new Sass(); | ||
// test default from constructor | ||
$sass->setMapPath('map_path.css.map'); | ||
echo $sass->getMapPath(); | ||
|
||
?> | ||
--EXPECT-- | ||
map_path.css.map |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
-TEST-- | ||
correctly handles setting map root | ||
--SKIPIF-- | ||
<?php if (!extension_loaded("sass")) print "skip"; ?> | ||
--FILE-- | ||
<?php | ||
|
||
$sass = new Sass(); | ||
// test default from constructor | ||
$sass->setComments(true); | ||
$sass->setMapRoot(__DIR__.'/support/'); | ||
$sass->setMapPath('map_root.css.map'); | ||
$css = $sass->compileFile(__DIR__.'/support/test.scss'); | ||
echo $css[1]; | ||
?> | ||
--EXPECT-- | ||
{ | ||
"version": 3, | ||
"file": "tests/support/test.css", | ||
"sources": [ | ||
"tests/support/test.scss" | ||
], | ||
"sourcesContent": [ | ||
"@import url(../blahblah/blah.blah);\n\ndiv {\n blah: \"hello #{2+2} world #{unit(23px)} #{'bloo'} blah\";\n}\n\n$foo: iphone;\n\ndiv {\n blah: \"foo #{$foo$ | ||
], | ||
"names": [], | ||
"mappings": "AAAA,OAAO,CAAC,0BAAI;;AAEZ,AAAA,GAAG,CAAC;EACF,IAAI,EAAE,4BAAiD,GACxD;;;AAID,AAAA,GAAG,CAAC;EACA,IAAI,EAAE,YAAa,GACtB" | ||
} |