diff options
author | Alon Zakai <alonzakai@gmail.com> | 2014-03-25 18:06:23 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2014-03-25 18:06:23 -0700 |
commit | bffcb8c7fe594af93749c7313d784b2341ed7532 (patch) | |
tree | b46a8e0413602e30f7a086b22bdb4e76050e5717 | |
parent | 78d5d9c1e1db669839cd17a0df01b69af67539f6 (diff) |
add dependency file testing
-rw-r--r-- | tests/test_other.py | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/test_other.py b/tests/test_other.py index 93cd9796..21c9ed25 100644 --- a/tests/test_other.py +++ b/tests/test_other.py @@ -2256,6 +2256,23 @@ 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_dependency_file_2(self): + self.clear() + shutil.copyfile(path_from_root('tests', 'hello_world.c'), 'a.c') + Popen([PYTHON, EMCC, 'a.c', '-MMD', '-MF', 'test.d', '-c']).communicate() + self.assertContained(open('test.d').read(), 'a.o: a.c\n') + + self.clear() + shutil.copyfile(path_from_root('tests', 'hello_world.c'), 'a.c') + Popen([PYTHON, EMCC, 'a.c', '-MMD', '-MF', 'test.d', '-c', '-o', 'test.o']).communicate() + self.assertContained(open('test.d').read(), 'test.o: a.c\n') + + self.clear() + shutil.copyfile(path_from_root('tests', 'hello_world.c'), 'a.c') + os.mkdir('obj') + Popen([PYTHON, EMCC, 'a.c', '-MMD', '-MF', 'test.d', '-c', '-o', 'obj/test.o']).communicate() + self.assertContained(open('test.d').read(), 'obj/test.o: a.c\n') + def test_quoted_js_lib_key(self): open('lib.js', 'w').write(r''' mergeInto(LibraryManager.library, { |