Nicer indent in CartoCSS (less likely to be converted)

This commit is contained in:
Sandro Santilli 2012-11-15 16:01:34 +01:00
parent 19436a8b14
commit 635b5db3e6

View File

@ -210,7 +210,7 @@ suite('server', function() {
url: '/tiles/my_table5/style?map_key=1234', url: '/tiles/my_table5/style?map_key=1234',
method: 'POST', method: 'POST',
headers: {host: 'localhost', 'Content-Type': 'application/x-www-form-urlencoded' }, headers: {host: 'localhost', 'Content-Type': 'application/x-www-form-urlencoded' },
data: querystring.stringify({style: 'Map {background-color:#fff;}'}) data: querystring.stringify({style: 'Map { background-color:#fff; }'})
},{ },{
}, function(res) { }, function(res) {
assert.equal(res.statusCode, 200, res.body); assert.equal(res.statusCode, 200, res.body);
@ -224,7 +224,7 @@ suite('server', function() {
url: '/tiles/my_table5/style?api_key=1234', url: '/tiles/my_table5/style?api_key=1234',
method: 'POST', method: 'POST',
headers: {host: 'localhost', 'Content-Type': 'application/x-www-form-urlencoded' }, headers: {host: 'localhost', 'Content-Type': 'application/x-www-form-urlencoded' },
data: querystring.stringify({style: 'Map {background-color:#fff;}'}) data: querystring.stringify({style: 'Map { background-color:#fff; }'})
},{}, function(res) { },{}, function(res) {
assert.equal(res.statusCode, 200, res.body); assert.equal(res.statusCode, 200, res.body);
done(); done();
@ -237,7 +237,7 @@ suite('server', function() {
url: '/tiles/my_table5/style?map_key=1234', url: '/tiles/my_table5/style?map_key=1234',
method: 'POST', method: 'POST',
headers: {host: 'localhost', 'Content-Type': 'application/x-www-form-urlencoded' }, headers: {host: 'localhost', 'Content-Type': 'application/x-www-form-urlencoded' },
data: querystring.stringify({style: 'Map {background-color:#fff;}'}) data: querystring.stringify({style: 'Map { background-color:#fff; }'})
},{ },{
}, function(res) { }, function(res) {
assert.equal(res.statusCode, 200, res.body); assert.equal(res.statusCode, 200, res.body);
@ -245,7 +245,7 @@ suite('server', function() {
url: '/tiles/my_table5/style', url: '/tiles/my_table5/style',
method: 'POST', method: 'POST',
headers: {host: 'localhost', 'Content-Type': 'application/x-www-form-urlencoded' }, headers: {host: 'localhost', 'Content-Type': 'application/x-www-form-urlencoded' },
data: querystring.stringify({style: 'Map {background-color:#aaa;}'}) data: querystring.stringify({style: 'Map { background-color:#aaa; }'})
},{}, function(res) { },{}, function(res) {
// FIXME: should be 401 Unauthorized // FIXME: should be 401 Unauthorized
assert.equal(res.statusCode, 500, res.body); assert.equal(res.statusCode, 500, res.body);
@ -259,7 +259,7 @@ suite('server', function() {
status: 200, status: 200,
}, function(res) { }, function(res) {
var parsed = JSON.parse(res.body); var parsed = JSON.parse(res.body);
assert.equal(parsed.style, 'Map {background-color:#fff;}'); assert.equal(parsed.style, 'Map { background-color:#fff; }');
assert.equal(parsed.style_version, '2.0.0'); assert.equal(parsed.style_version, '2.0.0');
done(); done();
}); });
@ -269,7 +269,7 @@ suite('server', function() {
}); });
test("post'ing good style returns 200 then getting returns original style", function(done){ test("post'ing good style returns 200 then getting returns original style", function(done){
var style = 'Map {background-color:#fff;}'; var style = 'Map { background-color:#fff; }';
assert.response(server, { assert.response(server, {
url: '/tiles/my_table5/style?map_key=1234', url: '/tiles/my_table5/style?map_key=1234',
method: 'POST', method: 'POST',
@ -307,7 +307,7 @@ suite('server', function() {
}); });
test("post'ing good style with style_convert returns 200 then getting returns converted style", function(done){ test("post'ing good style with style_convert returns 200 then getting returns converted style", function(done){
var style = 'Map {background-color:#fff;}'; var style = 'Map { background-color:#fff; }';
assert.response(server, { assert.response(server, {
url: '/tiles/my_table5/style?map_key=1234', url: '/tiles/my_table5/style?map_key=1234',
method: 'POST', method: 'POST',
@ -357,7 +357,7 @@ suite('server', function() {
status: 200, status: 200,
}, function(res) { }, function(res) {
var parsed = JSON.parse(res.body); var parsed = JSON.parse(res.body);
assert.equal(parsed.style, 'Map {background-color:#fff;}'); assert.equal(parsed.style, 'Map { background-color:#fff; }');
//assert.equal(parsed.version, '2.0.0'); //assert.equal(parsed.version, '2.0.0');
done(); done();
}); });