diff options
author | Vasilis Kalintiris <ehostunreach@gmail.com> | 2013-12-07 15:06:06 +0200 |
---|---|---|
committer | Vasilis Kalintiris <ehostunreach@gmail.com> | 2013-12-07 19:35:59 +0200 |
commit | aa11da7eff43adb57f935763f22c10abdff5279d (patch) | |
tree | 068ad274246310138a1b39d143b98007953469da /tests/test_core.py | |
parent | 71abd62af718a75477e0fb3feb954278d811a044 (diff) |
Use do_run_from_file() for test_vprintf
Diffstat (limited to 'tests/test_core.py')
-rw-r--r-- | tests/test_core.py | 25 |
1 files changed, 3 insertions, 22 deletions
diff --git a/tests/test_core.py b/tests/test_core.py index cdee3c76..5f5e7645 100644 --- a/tests/test_core.py +++ b/tests/test_core.py @@ -3594,29 +3594,10 @@ ok self.do_run_from_file(src, output) def test_vprintf(self): - src = r''' - #include <stdio.h> - #include <stdarg.h> - - void print(char* format, ...) { - va_list args; - va_start (args, format); - vprintf (format, args); - va_end (args); - } - - int main () { - print("Call with %d variable argument.\n", 1); - print("Call with %d variable %s.\n", 2, "arguments"); + test_path = path_from_root('tests', 'core', 'test_vprintf') + src, output = (test_path + s for s in ('.in', '.out')) - return 0; - } - ''' - expected = ''' - Call with 1 variable argument. - Call with 2 variable arguments. - ''' - self.do_run(src, re.sub('(^|\n)\s+', '\\1', expected)) + self.do_run_from_file(src, output) def test_vsnprintf(self): if self.emcc_args is None: return self.skip('needs i64 math') |