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) {
|
||||
var messParser = new xml2js.Parser();
|
||||
messParser.addListener('end', function(messXML) {
|
||||
removeAbsoluteDatasources(messXML);
|
||||
|
||||
completed = true;
|
||||
try {
|
||||
assert.deepEqual(messXML, resultXML);
|
||||
@ -37,7 +39,7 @@ helper.files('rendering', 'mml', function(file) {
|
||||
helper.showDifferences(e);
|
||||
throw '';
|
||||
}
|
||||
|
||||
|
||||
});
|
||||
messParser.parseString(output);
|
||||
});
|
||||
@ -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-polygon/__default__</StyleName>
|
||||
<Datasource>
|
||||
<Parameter name="file">false</Parameter>
|
||||
<Parameter name="file">[absolute path]</Parameter>
|
||||
<Parameter name="type">shape</Parameter>
|
||||
</Datasource>
|
||||
</Layer>
|
||||
@ -76,7 +76,7 @@
|
||||
<StyleName>countries-line/__default__</StyleName>
|
||||
<StyleName>countries-polygon/__default__</StyleName>
|
||||
<Datasource>
|
||||
<Parameter name="file">false</Parameter>
|
||||
<Parameter name="file">[absolute path]</Parameter>
|
||||
<Parameter name="type">shape</Parameter>
|
||||
</Datasource>
|
||||
</Layer>
|
||||
|
Loading…
Reference in New Issue
Block a user