File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed
Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -12781,3 +12781,16 @@ def test_signext_lowering(self):
1278112781 # should successfully lower sign-ext.
1278212782 self .run_process (cmd + ['-sMIN_SAFARI_VERSION=120000' , '-o' , 'lowered.js' ])
1278312783 self .assertEqual ('1\n ' , self .run_js ('lowered.js' ))
12784+
12785+ def test_locate_file_abspath_pthread (self ):
12786+ # Verify that `scriptDirectory` is an absolute path when `ENVIRONMENT_IS_WORKER`
12787+ self .emcc_args += ['-pthread' , '--pre-js' , 'pre.js' ]
12788+ self .set_setting ('PROXY_TO_PTHREAD' )
12789+ self .set_setting ('EXIT_RUNTIME' )
12790+ create_file ('pre.js' , '''
12791+ Module['locateFile'] = (fileName, scriptDirectory) => {
12792+ assert(nodePath['isAbsolute'](scriptDirectory), `scriptDirectory (${scriptDirectory}) should be an absolute path`);
12793+ return scriptDirectory + fileName;
12794+ };
12795+ ''' )
12796+ self .do_runf (test_file ('hello_world.c' ), 'hello, world!' )
You can’t perform that action at this time.
0 commit comments