aboutsummaryrefslogtreecommitdiff
path: root/tests/test_core.py
diff options
context:
space:
mode:
authorVasilis Kalintiris <ehostunreach@gmail.com>2013-12-07 14:05:54 +0200
committerVasilis Kalintiris <ehostunreach@gmail.com>2013-12-07 19:35:57 +0200
commite99d3d2dab89580d35ae2e53940765366aea38c5 (patch)
tree0fe7f9b40a44f0e3b80413711e2738eb27ae6ec9 /tests/test_core.py
parent80e7c536cd73ea1079d3d84b8b2e5403e8fff16a (diff)
Use do_run_from_file() for test_time_c
Diffstat (limited to 'tests/test_core.py')
-rw-r--r--tests/test_core.py12
1 files changed, 3 insertions, 9 deletions
diff --git a/tests/test_core.py b/tests/test_core.py
index 35be9651..0b073b08 100644
--- a/tests/test_core.py
+++ b/tests/test_core.py
@@ -2450,16 +2450,10 @@ The current type of b is: 9
self.do_run_from_file(src, output)
def test_time_c(self):
- src = r'''
- #include <time.h>
- #include <stdio.h>
+ test_path = path_from_root('tests', 'core', 'test_time_c')
+ src, output = (test_path + s for s in ('.in', '.out'))
- int main() {
- time_t t = time(0);
- printf("time: %s\n", ctime(&t));
- }
- '''
- self.do_run(src, 'time: ') # compilation check, mainly
+ self.do_run_from_file(src, output)
def test_gmtime(self):
src = r'''