diff options
author | Éloi Rivard <azmeuk@gmail.com> | 2013-04-30 00:15:16 +0200 |
---|---|---|
committer | Éloi Rivard <azmeuk@gmail.com> | 2013-05-02 00:06:13 +0200 |
commit | 8f4e931b7edb0755252ee23ff2c8f2edeec3aebd (patch) | |
tree | c5cedc030f1966fefd32e6d131ed41c6b9d27c13 /tests/runner.py | |
parent | ff5cad0ba476f74ee4743fb91bf4e256dfccde04 (diff) |
Added a symlink testcase.
Diffstat (limited to 'tests/runner.py')
-rwxr-xr-x | tests/runner.py | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/runner.py b/tests/runner.py index b7a7478f..77bcc288 100755 --- a/tests/runner.py +++ b/tests/runner.py @@ -9682,6 +9682,23 @@ f.close() self.assertContained('hello from lib', run_js(os.path.join(self.get_dir(), 'a.out.js'))) assert not os.path.exists('a.out') and not os.path.exists('a.exe'), 'Must not leave unneeded linker stubs' + def test_symlink(self): + open(os.path.join(self.get_dir(), 'foobar.xxx'), 'w').write('int main(){ return 0; }') + os.symlink(os.path.join(self.get_dir(), 'foobar.xxx'), os.path.join(self.get_dir(), 'foobar.c')) + Popen([PYTHON, EMCC, os.path.join(self.get_dir(), 'foobar.c'), '-o', os.path.join(self.get_dir(), 'foobar')], stdout=PIPE, stderr=PIPE).communicate() + assert os.path.exists(os.path.join(self.get_dir(), 'foobar')) + try_delete(os.path.join(self.get_dir(), 'foobar')) + try_delete(os.path.join(self.get_dir(), 'foobar.xxx')) + try_delete(os.path.join(self.get_dir(), 'foobar.c')) + + open(os.path.join(self.get_dir(), 'foobar.c'), 'w').write('int main(){ return 0; }') + os.symlink(os.path.join(self.get_dir(), 'foobar.c'), os.path.join(self.get_dir(), 'foobar.xxx')) + Popen([PYTHON, EMCC, os.path.join(self.get_dir(), 'foobar.xxx'), '-o', os.path.join(self.get_dir(), 'foobar')], stdout=PIPE, stderr=PIPE).communicate() + assert os.path.exists(os.path.join(self.get_dir(), 'foobar')) + try_delete(os.path.join(self.get_dir(), 'foobar')) + try_delete(os.path.join(self.get_dir(), 'foobar.xxx')) + try_delete(os.path.join(self.get_dir(), 'foobar.c')) + def test_multiply_defined_libsymbols(self): lib = "int mult() { return 1; }" lib_name = os.path.join(self.get_dir(), 'libA.c') |