@@ -19,10 +19,8 @@ function runHello(hostProcess) {
19
19
return execFileSync ( hostProcess , [ '-e' , testCode ] , { cwd : __dirname } ) . toString ( )
20
20
}
21
21
22
- function runDuplicateBindings ( hostProcess ) {
23
- if ( ! hostProcess ) {
24
- hostProcess = process . execPath
25
- }
22
+ function runDuplicateBindings ( ) {
23
+ const hostProcess = process . execPath ;
26
24
var testCode =
27
25
"console.log((function(bindings) {" +
28
26
"return bindings.pointerCheck1(bindings.pointerCheck2());" +
@@ -70,15 +68,13 @@ test('make sure addon symbols do not overlap', function (t) {
70
68
var addonPath = path . resolve ( __dirname , 'node_modules' , 'duplicate_symbols' )
71
69
// Set the loglevel otherwise the output disappears when run via 'npm test'
72
70
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 / )
75
73
var lastLine = logLines [ logLines . length - 1 ]
76
74
t . strictEqual ( err , null )
77
75
t . strictEqual ( lastLine , 'gyp info ok' , 'should end in ok' )
78
76
t . strictEqual ( runDuplicateBindings ( ) . trim ( ) , 'not equal' )
79
77
} )
80
- proc . stdout . setEncoding ( 'utf-8' )
81
- proc . stderr . setEncoding ( 'utf-8' )
82
78
} )
83
79
84
80
test ( 'build simple addon in path with non-ascii characters' , function ( t ) {
0 commit comments