ignore absolute paths in test
This commit is contained in:
parent
57eddba1ca
commit
21be74b487
@ -29,6 +29,8 @@ helper.files('rendering', 'mml', function(file) {
|
|||||||
resultParser.addListener('end', function(resultXML) {
|
resultParser.addListener('end', function(resultXML) {
|
||||||
var messParser = new xml2js.Parser();
|
var messParser = new xml2js.Parser();
|
||||||
messParser.addListener('end', function(messXML) {
|
messParser.addListener('end', function(messXML) {
|
||||||
|
removeAbsoluteDatasources(messXML);
|
||||||
|
|
||||||
completed = true;
|
completed = true;
|
||||||
try {
|
try {
|
||||||
assert.deepEqual(messXML, resultXML);
|
assert.deepEqual(messXML, resultXML);
|
||||||
@ -52,3 +54,15 @@ helper.files('rendering', 'mml', function(file) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
function removeAbsoluteDatasources(xml) {
|
||||||
|
xml.Layer.forEach(function(layer) {
|
||||||
|
layer.Datasource.Parameter.forEach(function(param) {
|
||||||
|
if (param.attr.name === 'file') {
|
||||||
|
param.text = "[absolute path]";
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
@ -41,7 +41,7 @@
|
|||||||
<StyleName>world-line/__default__</StyleName>
|
<StyleName>world-line/__default__</StyleName>
|
||||||
<StyleName>world-polygon/__default__</StyleName>
|
<StyleName>world-polygon/__default__</StyleName>
|
||||||
<Datasource>
|
<Datasource>
|
||||||
<Parameter name="file">false</Parameter>
|
<Parameter name="file">[absolute path]</Parameter>
|
||||||
<Parameter name="type">shape</Parameter>
|
<Parameter name="type">shape</Parameter>
|
||||||
</Datasource>
|
</Datasource>
|
||||||
</Layer>
|
</Layer>
|
||||||
@ -76,7 +76,7 @@
|
|||||||
<StyleName>countries-line/__default__</StyleName>
|
<StyleName>countries-line/__default__</StyleName>
|
||||||
<StyleName>countries-polygon/__default__</StyleName>
|
<StyleName>countries-polygon/__default__</StyleName>
|
||||||
<Datasource>
|
<Datasource>
|
||||||
<Parameter name="file">false</Parameter>
|
<Parameter name="file">[absolute path]</Parameter>
|
||||||
<Parameter name="type">shape</Parameter>
|
<Parameter name="type">shape</Parameter>
|
||||||
</Datasource>
|
</Datasource>
|
||||||
</Layer>
|
</Layer>
|
||||||
|
Loading…
Reference in New Issue
Block a user