@@ -249,93 +249,6 @@ tape.test('v5 compile', function(t) {
249249
250250 assert . end ( ) ;
251251 } ) ;
252-
253- t . test ( 'en-US fallback to en' , function ( assert ) {
254- var language = v5Compiler . getBestMatchingLanguage ( 'en-us' ) ;
255-
256- assert . equal ( v5Compiler . compile ( language , {
257- maneuver : {
258- type : 'turn' ,
259- modifier : 'left'
260- } ,
261- name : 'Way Name'
262- } ) , 'Turn left onto Way Name' ) ;
263-
264- assert . end ( ) ;
265- } ) ;
266-
267- t . test ( 'zh-CN fallback to zh-Hans' , function ( assert ) {
268- var language = v5Compiler . getBestMatchingLanguage ( 'zh-CN' ) ;
269-
270- assert . equal ( v5Compiler . compile ( language , {
271- maneuver : {
272- type : 'turn' ,
273- modifier : 'left'
274- } ,
275- name : 'Way Name'
276- } ) , '左转,上Way Name' ) ;
277-
278- assert . end ( ) ;
279- } ) ;
280-
281- t . test ( 'zh-Hant fallback to zh-Hanz' , function ( assert ) {
282- var language = v5Compiler . getBestMatchingLanguage ( 'zh-Hant' ) ;
283-
284- assert . equal ( v5Compiler . compile ( language , {
285- maneuver : {
286- type : 'turn' ,
287- modifier : 'left'
288- } ,
289- name : 'Way Name'
290- } ) , '左转,上Way Name' ) ;
291-
292- assert . end ( ) ;
293- } ) ;
294-
295- t . test ( 'zh-Hant-TW fallback to zh-Hant' , function ( assert ) {
296- var language = v5Compiler . getBestMatchingLanguage ( 'zh-Hant-TW' ) ;
297-
298- assert . equal ( v5Compiler . compile ( language , {
299- maneuver : {
300- type : 'turn' ,
301- modifier : 'left'
302- } ,
303- name : 'Way Name'
304- } ) , '左转,上Way Name' ) ;
305-
306- assert . end ( ) ;
307- } ) ;
308-
309- t . test ( 'es-MX fallback to es' , function ( assert ) {
310- var language = v5Compiler . getBestMatchingLanguage ( 'es-MX' ) ;
311-
312- assert . equal ( v5Compiler . compile ( language , {
313- maneuver : {
314- type : 'turn' ,
315- modifier : 'straight'
316- } ,
317- name : 'Way Name'
318- } ) , 'Ve recto en Way Name' ) ;
319-
320- assert . end ( ) ;
321- } ) ;
322-
323- t . test ( 'getBestMatchingLanguage' , function ( t ) {
324- t . equal ( v5Compiler . getBestMatchingLanguage ( 'foo' ) , 'en' ) ;
325- t . equal ( v5Compiler . getBestMatchingLanguage ( 'en-US' ) , 'en' ) ;
326- t . equal ( v5Compiler . getBestMatchingLanguage ( 'zh-CN' ) , 'zh-Hans' ) ;
327- t . equal ( v5Compiler . getBestMatchingLanguage ( 'zh-Hant' ) , 'zh-Hans' ) ;
328- t . equal ( v5Compiler . getBestMatchingLanguage ( 'zh-Hant-TW' ) , 'zh-Hans' ) ;
329- t . equal ( v5Compiler . getBestMatchingLanguage ( 'zh' ) , 'zh-Hans' ) ;
330- t . equal ( v5Compiler . getBestMatchingLanguage ( 'es-MX' ) , 'es' ) ;
331- t . equal ( v5Compiler . getBestMatchingLanguage ( 'es-ES' ) , 'es-ES' ) ;
332- t . equal ( v5Compiler . getBestMatchingLanguage ( 'pt' ) , 'pt-BR' ) ;
333- t . equal ( v5Compiler . getBestMatchingLanguage ( 'pt-AO' ) , 'pt-BR' ) ;
334- t . equal ( v5Compiler . getBestMatchingLanguage ( 'pt-PT' ) , 'pt-PT' ) ;
335- t . equal ( v5Compiler . getBestMatchingLanguage ( 'pt-pt' ) , 'pt-PT' ) ;
336- t . end ( ) ;
337- } ) ;
338-
339252 t . test ( 'fixtures match generated instructions' , function ( assert ) {
340253 // pre-load instructions
341254 var version = 'v5' ;
0 commit comments