Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions test/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -1412,6 +1412,10 @@ def build(self, filename, libraries=None, includes=None, force_c=False, emcc_arg
self.run_process(cmd, stderr=self.stderr_redirect if not DEBUG else None)
self.assertExists(output)

if output_suffix in ('.js', '.mjs'):
# Make sure we produced correct line endings
self.assertEqual(line_endings.check_line_endings(output), 0)

return output

def get_func(self, src, name):
Expand Down Expand Up @@ -1528,10 +1532,6 @@ def run_js(self, filename, engine=None, args=None,
if stderr != STDOUT:
stderr.close()

# Make sure that we produced proper line endings to the .js file we are about to run.
if not filename.endswith('.wasm'):
self.assertEqual(line_endings.check_line_endings(filename), 0)

ret = read_file(stdout_file)
if not interleaved_output:
ret += read_file(stderr_file)
Expand Down
1 change: 1 addition & 0 deletions test/test_other.py
Original file line number Diff line number Diff line change
Expand Up @@ -15678,6 +15678,7 @@ def test_late_module_api_assignment(self):
expected = f"Aborted(Attempt to set `Module.{prop}` after it has already been processed. This can happen, for example, when code is injected via '--post-js' rather than '--pre-js')"
self.do_runf(test_file('hello_world.c'), expected, emcc_args=['--post-js=post.js', '-sWASM_ASYNC_COMPILATION=0'], assert_returncode=NON_ZERO)

@crossplatform
def test_rollup(self):
copytree(test_file('rollup_node'), '.')
self.run_process([EMCC, test_file('hello_world.c'), '-sEXPORT_ES6', '-sEXIT_RUNTIME', '-sENVIRONMENT=node', '-sMODULARIZE', '-o', 'hello.mjs'])
Expand Down