diff options
Diffstat (limited to 'tests/test_core.py')
-rw-r--r-- | tests/test_core.py | 18 |
1 files changed, 4 insertions, 14 deletions
diff --git a/tests/test_core.py b/tests/test_core.py index 5b8976b7..20d79a47 100644 --- a/tests/test_core.py +++ b/tests/test_core.py @@ -3608,20 +3608,10 @@ ok self.do_run_from_file(src, output) def test_printf_more(self): - src = r''' - #include <stdio.h> - int main() { - int size = snprintf(NULL, 0, "%s %d %.2f\n", "me and myself", 25, 1.345); - char buf[size]; - snprintf(buf, size, "%s %d %.2f\n", "me and myself", 25, 1.345); - printf("%d : %s\n", size, buf); - char *buff = NULL; - asprintf(&buff, "%d waka %d\n", 21, 95); - puts(buff); - return 0; - } - ''' - self.do_run(src, '22 : me and myself 25 1.34\n21 waka 95\n') + test_path = path_from_root('tests', 'core', 'test_printf_more') + src, output = (test_path + s for s in ('.in', '.out')) + + self.do_run_from_file(src, output) def test_perrar(self): src = r''' |