@@ -19,8 +19,8 @@ if(process.env.FMTS) ex=process.env.FMTS.split(":").map(function(x){return x[0]=
19
19
var exp = ex . map ( function ( x ) { return x + ".pending" ; } ) ;
20
20
function test_file ( x ) { return ex . indexOf ( x . substr ( - 5 ) ) >= 0 || exp . indexOf ( x . substr ( - 13 ) ) >= 0 || ex . indexOf ( x . substr ( - 4 ) ) >= 0 || exp . indexOf ( x . substr ( - 12 ) ) >= 0 ; }
21
21
22
- var files = ( fs . existsSync ( 'tests.lst' ) ? fs . readFileSync ( 'tests.lst' , 'utf-8' ) . split ( "\n" ) : fs . readdirSync ( 'test_files' ) ) . filter ( test_file ) ;
23
- var fileA = ( fs . existsSync ( 'testA.lst' ) ? fs . readFileSync ( 'testA.lst' , 'utf-8' ) . split ( "\n" ) : [ ] ) . filter ( test_file ) ;
22
+ var files = ( fs . existsSync ( 'tests.lst' ) ? fs . readFileSync ( 'tests.lst' , 'utf-8' ) . split ( "\n" ) . map ( function ( x ) { return x . trim ( ) ; } ) : fs . readdirSync ( 'test_files' ) ) . filter ( test_file ) ;
23
+ var fileA = ( fs . existsSync ( 'testA.lst' ) ? fs . readFileSync ( 'testA.lst' , 'utf-8' ) . split ( "\n" ) . map ( function ( x ) { return x . trim ( ) ; } ) : [ ] ) . filter ( test_file ) ;
24
24
25
25
/* Excel enforces 31 character sheet limit, although technical file limit is 255 */
26
26
function fixsheetname ( x ) { return x . substr ( 0 , 31 ) ; }
@@ -987,6 +987,7 @@ describe('parse features', function() {
987
987
describe ( 'page margins' , function ( ) {
988
988
var wb1 , wb2 , wb3 , wb4 , wb5 , wbs ;
989
989
var bef = ( function ( ) {
990
+ if ( ! fs . existsSync ( paths . pmxls ) ) return wbs = [ ] ;
990
991
wb1 = X . readFile ( paths . pmxls ) ;
991
992
wb2 = X . readFile ( paths . pmxls5 ) ;
992
993
wb3 = X . readFile ( paths . pmxml ) ;
@@ -1251,7 +1252,7 @@ describe('roundtrip features', function() {
1251
1252
} ) ;
1252
1253
} ) ;
1253
1254
1254
- describe ( 'should preserve page margins' , function ( ) { [
1255
+ ( fs . existsSync ( paths . pmxlsx ) ? describe : describe . skip ) ( 'should preserve page margins' , function ( ) { [
1255
1256
//['xlml', paths.pmxml],
1256
1257
[ 'xlsx' , paths . pmxlsx ] ,
1257
1258
[ 'xlsb' , paths . pmxlsb ]
@@ -1654,7 +1655,7 @@ describe('encryption', function() {
1654
1655
1655
1656
describe ( 'multiformat tests' , function ( ) {
1656
1657
var mfopts = opts ;
1657
- var mft = fs . readFileSync ( 'multiformat.lst' , 'utf-8' ) . split ( "\n" ) ;
1658
+ var mft = fs . readFileSync ( 'multiformat.lst' , 'utf-8' ) . split ( "\n" ) . map ( function ( x ) { return x . trim ( ) ; } ) ;
1658
1659
var csv = true , formulae = false ;
1659
1660
mft . forEach ( function ( x ) {
1660
1661
if ( x [ 0 ] != "#" ) describe ( 'MFT ' + x , function ( ) {
0 commit comments