diff options
-rw-r--r-- | tests/core/test_libcextra.in | 13 | ||||
-rw-r--r-- | tests/core/test_libcextra.out | 1 | ||||
-rw-r--r-- | tests/test_core.py | 15 |
3 files changed, 17 insertions, 12 deletions
diff --git a/tests/core/test_libcextra.in b/tests/core/test_libcextra.in new file mode 100644 index 00000000..e0ff2f8e --- /dev/null +++ b/tests/core/test_libcextra.in @@ -0,0 +1,13 @@ + + #include <stdio.h> + #include <wchar.h> + + int main() + { + const wchar_t* wstr = L"Hello"; + + printf("wcslen: %d\n", wcslen(wstr)); + + return 0; + } +
\ No newline at end of file diff --git a/tests/core/test_libcextra.out b/tests/core/test_libcextra.out new file mode 100644 index 00000000..d0191c32 --- /dev/null +++ b/tests/core/test_libcextra.out @@ -0,0 +1 @@ +wcslen: 5
\ No newline at end of file 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 |