aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2013-12-10 11:10:47 -0800
committerAlon Zakai <alonzakai@gmail.com>2013-12-10 11:10:47 -0800
commit539ce7ac862e60a8ae3cd94c59a24a8e992b0c64 (patch)
treeeb4299c34bd112767b51df0715f21e37b7109549 /tests
parentd69977b56d12b5e8077b8e118b050ac288099a34 (diff)
quote keys in library objects when necessary; fixes #1908
Diffstat (limited to 'tests')
-rw-r--r--tests/test_other.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/test_other.py b/tests/test_other.py
index 5100db72..b10ae13b 100644
--- a/tests/test_other.py
+++ b/tests/test_other.py
@@ -2136,3 +2136,17 @@ int main()
assert 'test.o' in head, 'Invalid dependency target'
assert 'test.cpp' in tail and 'test.hpp' in tail, 'Invalid dependencies generated'
+ def test_quoted_js_lib_key(self):
+ open('lib.js', 'w').write(r'''
+mergeInto(LibraryManager.library, {
+ __internal_data:{
+ '<' : 0,
+ 'white space' : 1
+ },
+ printf__deps: ['__internal_data', 'fprintf']
+});
+''')
+
+ Popen([PYTHON, EMCC, path_from_root('tests', 'hello_world.cpp'), '--js-library', 'lib.js']).communicate()
+ self.assertContained('hello, world!', run_js(os.path.join(self.get_dir(), 'a.out.js')))
+