summaryrefslogtreecommitdiff
path: root/tests/test_core.py
diff options
context:
space:
mode:
authorVasilis Kalintiris <ehostunreach@gmail.com>2013-12-07 10:54:36 +0200
committerVasilis Kalintiris <ehostunreach@gmail.com>2013-12-07 19:35:52 +0200
commite6db99720aded590a5a580096d3a89e8237a9ddc (patch)
tree442113c6a016843aef85e62f513e9d636fd3278c /tests/test_core.py
parent3ae52c48122ba894d3b4b2e93be8535b6720cc38 (diff)
Use do_run_from_file() for test_globals
Diffstat (limited to 'tests/test_core.py')
-rw-r--r--tests/test_core.py16
1 files changed, 3 insertions, 13 deletions
diff --git a/tests/test_core.py b/tests/test_core.py
index c6ab5ab9..66ef952b 100644
--- a/tests/test_core.py
+++ b/tests/test_core.py
@@ -1002,20 +1002,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_globals(self):
- src = '''
- #include <stdio.h>
-
- char cache[256], *next = cache;
+ test_path = path_from_root('tests', 'core', 'test_globals')
+ src, output = (test_path + s for s in ('.in', '.out'))
- int main()
- {
- cache[10] = 25;
- next[20] = 51;
- printf("*%d,%d*\\n", next[10], cache[20]);
- return 0;
- }
- '''
- self.do_run(src, '*25,51*')
+ self.do_run_from_file(src, output)
def test_linked_list(self):
src = '''