@@ -19,10 +19,8 @@ function runHello(hostProcess) {
1919 return execFileSync ( hostProcess , [ '-e' , testCode ] , { cwd : __dirname } ) . toString ( )
2020}
2121
22- function runDuplicateBindings ( hostProcess ) {
23- if ( ! hostProcess ) {
24- hostProcess = process . execPath
25- }
22+ function runDuplicateBindings ( ) {
23+ const hostProcess = process . execPath ;
2624 var testCode =
2725 "console.log((function(bindings) {" +
2826 "return bindings.pointerCheck1(bindings.pointerCheck2());" +
@@ -70,15 +68,13 @@ test('make sure addon symbols do not overlap', function (t) {
7068 var addonPath = path . resolve ( __dirname , 'node_modules' , 'duplicate_symbols' )
7169 // Set the loglevel otherwise the output disappears when run via 'npm test'
7270 var cmd = [ nodeGyp , 'rebuild' , '-C' , addonPath , '--loglevel=verbose' ]
73- var proc = execFile ( process . execPath , cmd , function ( err , stdout , stderr ) {
74- var logLines = stderr . toString ( ) . trim ( ) . split ( / \r ? \n / )
71+ execFile ( process . execPath , cmd , function ( err , stdout , stderr ) {
72+ var logLines = stderr . trim ( ) . split ( / \r ? \n / )
7573 var lastLine = logLines [ logLines . length - 1 ]
7674 t . strictEqual ( err , null )
7775 t . strictEqual ( lastLine , 'gyp info ok' , 'should end in ok' )
7876 t . strictEqual ( runDuplicateBindings ( ) . trim ( ) , 'not equal' )
7977 } )
80- proc . stdout . setEncoding ( 'utf-8' )
81- proc . stderr . setEncoding ( 'utf-8' )
8278} )
8379
8480test ( 'build simple addon in path with non-ascii characters' , function ( t ) {
0 commit comments