@@ -3938,14 +3938,14 @@ def test_file_packager_standalone_modularize(self):
3938
3938
MESSAGE = 'Remember to build the main file with `-sFORCE_FILESYSTEM` so that it includes support for loading this file package'
3939
3939
3940
3940
create_file('data.txt', 'hello data')
3941
- err = self.run_process([FILE_PACKAGER, 'test.data', '--modularize', '--preload', 'data.txt', '--js-output=dataFileLoader.mjs '], stderr=PIPE).stderr
3941
+ err = self.run_process([FILE_PACKAGER, 'test.data', '--modularize', '--preload', 'data.txt', '--js-output=dataFileLoader.js '], stderr=PIPE).stderr
3942
3942
self.assertContained(MESSAGE, err)
3943
3943
3944
- create_file('test.cpp ', '''
3944
+ create_file('test.c ', '''
3945
3945
#include <stdio.h>
3946
- #include <emscripten/bind .h>
3946
+ #include <emscripten.h>
3947
3947
3948
- int EMSCRIPTEN_KEEPALIVE test_fun() {
3948
+ EMSCRIPTEN_KEEPALIVE int test_fun() {
3949
3949
FILE* f = fopen("data.txt", "r");
3950
3950
char buf[64];
3951
3951
int rtn = fread(buf, 1, 64, f);
@@ -3955,11 +3955,11 @@ def test_file_packager_standalone_modularize(self):
3955
3955
return 0;
3956
3956
}
3957
3957
''')
3958
- self.run_process([EMCC, 'test.cpp ', '-sFORCE_FILESYSTEM', '-sMODULARIZE', '-sEXPORT_ES6', '-o', 'moduleFile.mjs '])
3958
+ self.run_process([EMCC, 'test.c ', '-sFORCE_FILESYSTEM', '-sMODULARIZE', '-sEXPORT_ES6', '-o', 'moduleFile.js '])
3959
3959
3960
3960
create_file('run.js', '''
3961
- import loadDataFile from 'dataFileLoader.mjs '
3962
- import {default as loadModule} from 'moduleFile.mjs '
3961
+ import loadDataFile from './ dataFileLoader.js '
3962
+ import {default as loadModule} from './ moduleFile.js '
3963
3963
3964
3964
var module = loadModule();
3965
3965
module.then((mod) => {
0 commit comments