This commit is contained in:
Alon Zakai 2014-10-29 12:52:31 -07:00
Родитель b300e569d7
Коммит f612725265
2 изменённых файлов: 6 добавлений и 8 удалений

Просмотреть файл

@ -13,14 +13,6 @@ class T(RunnerCore): # Short name, to make it more fun to use manually on the co
def is_emterpreter(self):
return 'EMTERPRETIFY=1' in self.emcc_args
def test_require(self):
inname = path_from_root('tests', 'hello_world.c')
Building.emcc(inname, output_filename='a.out.js')
output = Popen([NODE_JS, '-e', 'require("./a.out.js")'], stdout=PIPE, stderr=PIPE).communicate()
assert output == ('hello, world!\n \n', ''), 'expected no output, got\n===\nSTDOUT\n%s\n===\nSTDERR\n%s\n===\n' % output
def test_hello_world(self):
test_path = path_from_root('tests', 'core', 'test_hello_world')
src, output = (test_path + s for s in ('.in', '.out'))

Просмотреть файл

@ -4383,3 +4383,9 @@ int main(void) {
Popen([PYTHON, EMCC, 'z.o', 'libtest.a'] + args).communicate()
out = run_js('a.out.js', assert_returncode=161)
def test_require(self):
inname = path_from_root('tests', 'hello_world.c')
Building.emcc(inname, output_filename='a.out.js')
output = Popen(NODE_JS + ['-e', 'require("./a.out.js")'], stdout=PIPE, stderr=PIPE).communicate()
assert output == ('hello, world!\n \n', ''), 'expected no output, got\n===\nSTDOUT\n%s\n===\nSTDERR\n%s\n===\n' % output