aboutsummaryrefslogtreecommitdiff
path: root/tests/runner.py
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2012-03-16 10:48:45 -0700
committerAlon Zakai <alonzakai@gmail.com>2012-03-16 10:48:45 -0700
commit04961832c66b1381838f7e6f94a3463b145b16fb (patch)
treeda3e9ce4f382ce6a8a880f6ab769ab806767a1fe /tests/runner.py
parent1a1d011c9ba70ffe40b312fd3367b2b843ca257a (diff)
allow preloading/embedding of entire directories using emcc
Diffstat (limited to 'tests/runner.py')
-rwxr-xr-xtests/runner.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/runner.py b/tests/runner.py
index 4fc8cfa9..66aa63b4 100755
--- a/tests/runner.py
+++ b/tests/runner.py
@@ -6275,9 +6275,14 @@ f.close()
}
'''))
+ # by individual files
Popen([EMCC, os.path.join(self.get_dir(), 'main.cpp'), '--preload-file', 'subdirr/data1.txt', '--preload-file', 'subdirr/data2.txt', '-o', 'page.html']).communicate()
self.run_browser('page.html', 'You should see two cool numbers', '/report_result?1')
+ # by directory
+ Popen([EMCC, os.path.join(self.get_dir(), 'main.cpp'), '--preload-file', 'subdirr', '-o', 'page.html']).communicate()
+ self.run_browser('page.html', 'You should see two cool numbers', '/report_result?1')
+
def test_emcc_sdl_image(self):
# load an image file, get pixel data
shutil.copyfile(path_from_root('tests', 'screenshot.jpg'), os.path.join(self.get_dir(), 'screenshot.jpg'))