@@ -4915,24 +4915,26 @@ def test_jslib_search_path(self):
4915
4915
4916
4916
# Tests using the #warning directive in JS library files
4917
4917
def test_jslib_warnings(self):
4918
- proc = self.run_process([EMCC, test_file('hello_world.c'), '--js-library', test_file('warning_in_js_libraries.js')], stdout=PIPE, stderr=PIPE)
4918
+ shutil.copy(test_file('warning_in_js_libraries.js'), '.')
4919
+ proc = self.run_process([EMCC, test_file('hello_world.c'), '--js-library', 'warning_in_js_libraries.js'], stdout=PIPE, stderr=PIPE)
4919
4920
self.assertNotContained('This warning should not be present!', proc.stderr)
4920
- self.assertContained('warning_in_js_libraries.js:5: #warning This is a warning string!', proc.stderr)
4921
- self.assertContained('warning_in_js_libraries.js:7: #warning This is a second warning string!', proc.stderr)
4921
+ self.assertContained('warning: warning_in_js_libraries.js:5: #warning This is a warning string!', proc.stderr)
4922
+ self.assertContained('warning: warning_in_js_libraries.js:7: #warning This is a second warning string!', proc.stderr)
4922
4923
self.assertContained('emcc: warning: warnings in JS library compilation [-Wjs-compiler]', proc.stderr)
4923
4924
4924
- err = self.expect_fail([EMCC, test_file('hello_world.c'), '--js-library', test_file( 'warning_in_js_libraries.js') , '-Werror'])
4925
+ err = self.expect_fail([EMCC, test_file('hello_world.c'), '--js-library', 'warning_in_js_libraries.js', '-Werror'])
4925
4926
self.assertNotContained('This warning should not be present!', err)
4926
- self.assertContained('warning_in_js_libraries.js:5: #warning This is a warning string!', err)
4927
- self.assertContained('warning_in_js_libraries.js:7: #warning This is a second warning string!', err)
4927
+ self.assertContained('warning: warning_in_js_libraries.js:5: #warning This is a warning string!', err)
4928
+ self.assertContained('warning: warning_in_js_libraries.js:7: #warning This is a second warning string!', err)
4928
4929
self.assertContained('emcc: error: warnings in JS library compilation [-Wjs-compiler] [-Werror]', err)
4929
4930
4930
4931
# Tests using the #error directive in JS library files
4931
4932
def test_jslib_errors(self):
4932
- err = self.expect_fail([EMCC, test_file('hello_world.c'), '--js-library', test_file('error_in_js_libraries.js')])
4933
+ shutil.copy(test_file('error_in_js_libraries.js'), '.')
4934
+ err = self.expect_fail([EMCC, test_file('hello_world.c'), '--js-library', 'error_in_js_libraries.js'])
4933
4935
self.assertNotContained('This error should not be present!', err)
4934
- self.assertContained('error_in_js_libraries.js:5: #error This is an error string!', err)
4935
- self.assertContained('error_in_js_libraries.js:7: #error This is a second error string!', err)
4936
+ self.assertContained('error: error_in_js_libraries.js:5: #error This is an error string!', err)
4937
+ self.assertContained('error: error_in_js_libraries.js:7: #error This is a second error string!', err)
4936
4938
4937
4939
def test_jslib_include(self):
4938
4940
create_file('inc.js', '''
0 commit comments