fix test harness for native optimizer
This commit is contained in:
Родитель
7bc309cd2b
Коммит
84f75552aa
|
@ -1945,7 +1945,7 @@ int f() {
|
||||||
shutil.copyfile(input, input_temp)
|
shutil.copyfile(input, input_temp)
|
||||||
Popen(listify(NODE_JS) + [path_from_root('tools', 'js-optimizer.js'), input_temp, 'emitJSON'], stdin=PIPE, stdout=open(input_temp + '.js', 'w')).communicate()
|
Popen(listify(NODE_JS) + [path_from_root('tools', 'js-optimizer.js'), input_temp, 'emitJSON'], stdin=PIPE, stdout=open(input_temp + '.js', 'w')).communicate()
|
||||||
output = Popen([js_optimizer.get_native_optimizer(), input_temp + '.js'] + passes, stdin=PIPE, stdout=open(output_temp, 'w')).communicate()[0]
|
output = Popen([js_optimizer.get_native_optimizer(), input_temp + '.js'] + passes, stdin=PIPE, stdout=open(output_temp, 'w')).communicate()[0]
|
||||||
Popen(listify(NODE_JS) + [path_from_root('tools', 'js-optimizer.js'), output_temp, 'emitJSON'], stdin=PIPE, stdout=open(output_temp + '.js', 'w')).communicate()
|
Popen(listify(NODE_JS) + [path_from_root('tools', 'js-optimizer.js'), output_temp, 'receiveJSON'], stdin=PIPE, stdout=open(output_temp + '.js', 'w')).communicate()
|
||||||
output = open(output_temp + '.js').read()
|
output = open(output_temp + '.js').read()
|
||||||
self.assertIdentical(expected, output.replace('\r\n', '\n').replace('\n\n', '\n'))
|
self.assertIdentical(expected, output.replace('\r\n', '\n').replace('\n\n', '\n'))
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче