summaryrefslogtreecommitdiff
path: root/tests/test_core.py
diff options
context:
space:
mode:
authorVasilis Kalintiris <ehostunreach@gmail.com>2013-12-07 11:59:40 +0200
committerVasilis Kalintiris <ehostunreach@gmail.com>2013-12-07 19:35:55 +0200
commit45243528c0cefc663314a412b3c34b3469587bdd (patch)
tree404738e8978cb5b1e117b46659d3a5748f71aa5e /tests/test_core.py
parent74502e3598b09e6663ece351c0bc2c0aafd68338 (diff)
Use do_run_from_file() for test_alloca
Diffstat (limited to 'tests/test_core.py')
-rw-r--r--tests/test_core.py14
1 files changed, 3 insertions, 11 deletions
diff --git a/tests/test_core.py b/tests/test_core.py
index b72ae793..0092a27d 100644
--- a/tests/test_core.py
+++ b/tests/test_core.py
@@ -1552,18 +1552,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_alloca(self):
- src = '''
- #include <stdio.h>
- #include <stdlib.h>
+ test_path = path_from_root('tests', 'core', 'test_alloca')
+ src, output = (test_path + s for s in ('.in', '.out'))
- int main() {
- char *pc;
- pc = (char *)alloca(5);
- printf("z:%d*%d*\\n", pc > 0, (int)pc);
- return 0;
- }
- '''
- self.do_run(src, 'z:1*', force_c=True)
+ self.do_run_from_file(src, output, force_c=True)
def test_rename(self):
src = open(path_from_root('tests', 'stdio', 'test_rename.c'), 'r').read()