aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/htmltest.pngbin0 -> 743 bytes
-rwxr-xr-xtests/runner.py13
2 files changed, 6 insertions, 7 deletions
diff --git a/tests/htmltest.png b/tests/htmltest.png
new file mode 100644
index 00000000..980245ee
--- /dev/null
+++ b/tests/htmltest.png
Binary files differ
diff --git a/tests/runner.py b/tests/runner.py
index aee2b859..92792e0b 100755
--- a/tests/runner.py
+++ b/tests/runner.py
@@ -6696,13 +6696,6 @@ elif 'browser' in str(sys.argv):
time.sleep(5)
print '(moving on..)'
- def test_html(self):
- # test HTML generation.
- output = Popen(['python', EMCC, path_from_root('tests', 'hello_world_sdl.cpp'), '-o', 'something.html'], stdout=PIPE, stderr=PIPE).communicate()
- assert len(output[0]) == 0, output[0]
- assert os.path.exists('something.html'), output
- self.run_browser('something.html', 'You should see "hello, world!" and a colored cube.')
-
def with_report_result(self, code):
return code.replace('REPORT_RESULT();', '''
char output[1000];
@@ -6768,6 +6761,12 @@ elif 'browser' in str(sys.argv):
};
''' % basename)
+ def test_html(self):
+ # test HTML generation.
+ self.reftest(path_from_root('tests', 'htmltest.png'))
+ output = Popen(['python', EMCC, path_from_root('tests', 'hello_world_sdl.cpp'), '-o', 'something.html', '--pre-js', 'reftest.js']).communicate()
+ self.run_browser('something.html', 'You should see "hello, world!" and a colored cube.', '/report_result?0')
+
def test_compression(self):
open(os.path.join(self.get_dir(), 'main.cpp'), 'w').write(self.with_report_result(r'''
#include <stdio.h>