summaryrefslogtreecommitdiff
path: root/tests/test_core.py
diff options
context:
space:
mode:
authorVasilis Kalintiris <ehostunreach@gmail.com>2013-12-07 11:00:35 +0200
committerVasilis Kalintiris <ehostunreach@gmail.com>2013-12-07 19:35:53 +0200
commit121b362fc7afa14217858e9188a6c858b687656c (patch)
tree476aef2975c021e2e9c2563ba7b0e78994263759 /tests/test_core.py
parentdb6c55fdc2be4f67106b4672a4205289ab6aedbd (diff)
Use do_run_from_file() for test_libcextra
Diffstat (limited to 'tests/test_core.py')
-rw-r--r--tests/test_core.py15
1 files changed, 3 insertions, 12 deletions
diff --git a/tests/test_core.py b/tests/test_core.py
index 2629589b..02d4cb6b 100644
--- a/tests/test_core.py
+++ b/tests/test_core.py
@@ -1071,20 +1071,11 @@ class T(RunnerCore): # Short name, to make it more fun to use manually on the co
def test_libcextra(self):
if self.emcc_args is None: return self.skip('needs emcc for libcextra')
- src = r'''
- #include <stdio.h>
- #include <wchar.h>
-
- int main()
- {
- const wchar_t* wstr = L"Hello";
- printf("wcslen: %d\n", wcslen(wstr));
+ test_path = path_from_root('tests', 'core', 'test_libcextra')
+ src, output = (test_path + s for s in ('.in', '.out'))
- return 0;
- }
- '''
- self.do_run(src, 'wcslen: 5')
+ self.do_run_from_file(src, output)
def test_regex(self):
# This is from http://pic.dhe.ibm.com/infocenter/iseries/v7r1m0/index.jsp?topic=%2Frtref%2Fregexec.htm