diff options
Diffstat (limited to 'tests/test_other.py')
-rw-r--r-- | tests/test_other.py | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/test_other.py b/tests/test_other.py index 5a76bf6a..b10ae13b 100644 --- a/tests/test_other.py +++ b/tests/test_other.py @@ -371,6 +371,11 @@ f.close() process.communicate() assert process.returncode is 0, 'User should be able to specify custom -std= on the command line!' + def test_cap_suffixes(self): + shutil.copyfile(path_from_root('tests', 'hello_world.cpp'), 'test.CPP') + Popen([PYTHON, EMCC, os.path.join(self.get_dir(), 'test.CPP')]).communicate() + self.assertContained('hello, world!', run_js(os.path.join(self.get_dir(), 'a.out.js'))) + def test_catch_undef(self): open(os.path.join(self.get_dir(), 'test.cpp'), 'w').write(r''' #include <vector> @@ -2131,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'))) + |