@@ -7122,7 +7122,8 @@ def test_umask_0(self):
7122
7122
self.run_process([EMCC, 'src.c'])
7123
7123
self.assertContained('hello, world!', self.run_js('a.out.js'))
7124
7124
7125
- def test_no_missing_symbols(self): # simple hello world should not show any missing symbols
7125
+ def test_no_missing_symbols(self):
7126
+ # simple hello world should not show any missing symbols
7126
7127
self.run_process([EMCC, test_file('hello_world.c')])
7127
7128
7128
7129
# main() is implemented in C, and even if requested from JS, we should not warn
@@ -7188,6 +7189,20 @@ def test_js_lib_native_deps(self):
7188
7189
7189
7190
self.do_runf('test.c', 'dddddddddd\n', emcc_args=['--js-library', 'lib.js'])
7190
7191
7192
+ def test_js_lib_native_deps_extra(self):
7193
+ # Similar to above but the JS symbol is not used by the native code.
7194
+ # Instead is it explictly injected using `extraLibraryFuncs`.
7195
+ create_file('lib.js', r'''
7196
+ addToLibrary({
7197
+ jsfunc__deps: ['raise'],
7198
+ jsfunc: (ptr) => {
7199
+ _raise(1);
7200
+ },
7201
+ });
7202
+ extraLibraryFuncs.push('jsfunc');
7203
+ ''')
7204
+ self.do_runf(test_file('hello_world.c'), emcc_args=['--js-library', 'lib.js'])
7205
+
7191
7206
@crossplatform
7192
7207
def test_realpath(self):
7193
7208
create_file('src.c', r'''
0 commit comments