File tree Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -132,6 +132,26 @@ childProcess.exec(
132132 }
133133) ;
134134
135+ // test that preloading with a relative path works
136+ process . chdir ( fixtures . fixturesDir ) ;
137+ childProcess . exec (
138+ `"${ nodeBinary } " ${ preloadOption ( [ './printA.js' ] ) } "${ fixtureB } "` ,
139+ common . mustCall ( function ( err , stdout , stderr ) {
140+ assert . ifError ( err ) ;
141+ assert . strictEqual ( stdout , 'A\nB\n' ) ;
142+ } )
143+ ) ;
144+ if ( common . isWindows ) {
145+ // https://github.com/nodejs/node/issues/21918
146+ childProcess . exec (
147+ `"${ nodeBinary } " ${ preloadOption ( [ '.\\printA.js' ] ) } "${ fixtureB } "` ,
148+ common . mustCall ( function ( err , stdout , stderr ) {
149+ assert . ifError ( err ) ;
150+ assert . strictEqual ( stdout , 'A\nB\n' ) ;
151+ } )
152+ ) ;
153+ }
154+
135155// https://github.com/nodejs/node/issues/1691
136156process . chdir ( fixtures . fixturesDir ) ;
137157childProcess . exec (
You can’t perform that action at this time.
0 commit comments