Skip to content

Commit b2b97c2

Browse files
authored
tests: Avoid passing True/False strings as -s settings (#16537)
I notived this bug while adding type checking to `-s` settings. Luckly it only seems to effect one test.
1 parent 0c43591 commit b2b97c2

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

tests/common.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -515,6 +515,8 @@ def get_setting(self, key, default=None):
515515
def set_setting(self, key, value=1):
516516
if value is None:
517517
self.clear_setting(key)
518+
if type(value) == bool:
519+
value = int(value)
518520
self.settings_mods[key] = value
519521

520522
def has_changed_setting(self, key):

tests/test_core.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7815,6 +7815,7 @@ def test_async_ccall_promise(self, exit_runtime):
78157815
self.set_setting('INVOKE_RUN', 0)
78167816
self.set_setting('EXIT_RUNTIME', exit_runtime)
78177817
self.set_setting('EXPORTED_FUNCTIONS', ['_stringf', '_floatf'])
7818+
self.set_setting('DEFAULT_LIBRARY_FUNCS_TO_INCLUDE', ['$maybeExit'])
78187819
create_file('main.c', r'''
78197820
#include <stdio.h>
78207821
#include <emscripten.h>

0 commit comments

Comments
 (0)