@@ -7660,7 +7660,7 @@ def test_dash_s_unclosed_list(self):
76607660
76617661 def test_dash_s_valid_list(self):
76627662 err = self.expect_fail([EMCC, test_file('hello_world.cpp'), "-sTEST_KEY=[Value1, \"Value2\"]"])
7663- self.assertNotContained('a problem occurred in evaluating the content after a "-s", specifically ', err)
7663+ self.assertNotContained('error parsing "-s" setting ', err)
76647664
76657665 def test_dash_s_wrong_type(self):
76667666 err = self.expect_fail([EMCC, test_file('hello_world.cpp'), '-sEXIT_RUNTIME=[foo,bar]'])
@@ -7692,6 +7692,15 @@ def test_dash_s_hex(self):
76927692 # Ensure that 0x0 is parsed as a zero and not as the string '0x0'.
76937693 self.run_process([EMCC, test_file('hello_world.c'), '-nostdlib', '-sERROR_ON_UNDEFINED_SYMBOLS=0x0'])
76947694
7695+ def test_dash_s_bad_json_types(self):
7696+ # Dict rather than string/list
7697+ err = self.expect_fail([EMCC, test_file('hello_world.c'), '-sEXPORTED_FUNCTIONS={"a":1}'])
7698+ self.assertContained("settings must be strings or lists (not $<class 'dict'>", err)
7699+
7700+ # List element is not a string
7701+ err = self.expect_fail([EMCC, test_file('hello_world.c'), '-sEXPORTED_FUNCTIONS=[{"a":1}]'])
7702+ self.assertContained("list members in settings must be strings (not $<class 'dict'>)", err)
7703+
76957704 def test_zeroinit(self):
76967705 create_file('src.c', r'''
76977706#include <stdio.h>
0 commit comments