diff options
-rw-r--r-- | tests/core/test_funcs.in | 12 | ||||
-rw-r--r-- | tests/core/test_funcs.out | 1 | ||||
-rw-r--r-- | tests/test_core.py | 17 |
3 files changed, 17 insertions, 13 deletions
diff --git a/tests/core/test_funcs.in b/tests/core/test_funcs.in new file mode 100644 index 00000000..f2e707f9 --- /dev/null +++ b/tests/core/test_funcs.in @@ -0,0 +1,12 @@ + + #include <stdio.h> + int funcy(int x) + { + return x*9; + } + int main() + { + printf("*%d,%d*\n", funcy(8), funcy(10)); + return 0; + } +
\ No newline at end of file diff --git a/tests/core/test_funcs.out b/tests/core/test_funcs.out new file mode 100644 index 00000000..f58def9a --- /dev/null +++ b/tests/core/test_funcs.out @@ -0,0 +1 @@ +*72,90*
\ No newline at end of file diff --git a/tests/test_core.py b/tests/test_core.py index fb4a4ff8..823c0285 100644 --- a/tests/test_core.py +++ b/tests/test_core.py @@ -958,19 +958,10 @@ class T(RunnerCore): # Short name, to make it more fun to use manually on the co self.do_run_from_file(src, output) def test_funcs(self): - src = ''' - #include <stdio.h> - int funcy(int x) - { - return x*9; - } - int main() - { - printf("*%d,%d*\\n", funcy(8), funcy(10)); - return 0; - } - ''' - self.do_run(src, '*72,90*') + test_path = path_from_root('tests', 'core', 'test_funcs') + src, output = (test_path + s for s in ('.in', '.out')) + + self.do_run_from_file(src, output) def test_structs(self): src = ''' |