Skip to content

Commit

Permalink
Properly process alt_name tag when there are multiple entries separat…
Browse files Browse the repository at this point in the history
…ed by semicolon
  • Loading branch information
SiarheiFedartsou committed Nov 29, 2024
1 parent b760154 commit 75309fa
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/stream/tag_mapper.js
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ module.exports.tests.osm_names = function(test, common) {
nat_name: 'nat_name',
int_name: 'int_name',
name: 'name',
alt_name: 'alt_name;alt_name2',
alt_name: 'alt_name;alt_name2;alt_name3',
official_name: 'official_name',
old_name: 'old_name',
reg_name: 'reg_name',
Expand All @@ -129,7 +129,7 @@ module.exports.tests.osm_names = function(test, common) {
var stream = mapper();
stream.pipe( through.obj( function( doc, enc, next ){
t.equal(doc.getName('default'), 'name', 'correctly mapped');
t.deepEqual(doc.getNameAliases('default'), ['loc_name','alt_name','alt_name2','short_name'], 'correctly mapped');
t.deepEqual(doc.getNameAliases('default'), ['loc_name','alt_name','alt_name2','alt_name3','short_name'], 'correctly mapped');

t.end(); // test will fail if not called (or called twice).
next();
Expand Down

0 comments on commit 75309fa

Please sign in to comment.