Adding nested classes test and fixed specificity test runner

This commit is contained in:
Tom MacWright 2011-08-22 16:21:57 -04:00
parent 86e79b9b2c
commit f6b5f5785a
3 changed files with 16 additions and 7 deletions

View File

@ -26,17 +26,15 @@ function cleanupItem(key, value) {
helper.files('specificity', 'mss', function(file) {
exports['test ' + file] = function(beforeExit) {
helper.file(file, function(content) {
new carto.Parser({
var tree = (new carto.Parser({
paths: [ path.dirname(file) ],
filename: file
}).parse(content, function (err, tree) {
if (err) throw err;
})).parse(content);
var mss = tree.toList({});
mss = helper.makePlain(mss, cleanupItem);
var mss = tree.toList({});
mss = helper.makePlain(mss, cleanupItem);
helper.compareToFile(mss, file, helper.resultFile(file));
});
helper.compareToFile(mss, file, helper.resultFile(file));
});
}
});

View File

@ -0,0 +1,8 @@
.strikes {
marker-width:1;
.fill { marker-opacity:1; }
&.outline { marker-line-opacity:1; }
[ISO = "USA"] {
marker-line-opacity:0.4;
}
}

View File

@ -0,0 +1,3 @@
[
{"elements":[".strikes"],"specificity":[0,1,0,13]}
]