aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xtests/runner.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/runner.py b/tests/runner.py
index b6980933..c4760b07 100755
--- a/tests/runner.py
+++ b/tests/runner.py
@@ -3966,6 +3966,18 @@ The current type of b is: 9
'''
self.do_run(src, '*0\n')
+ def test_time_c(self):
+ src = r'''
+ #include <time.h>
+ #include <stdio.h>
+
+ int main() {
+ time_t t = time(0);
+ printf("time: %s\n", ctime(&t));
+ }
+ '''
+ self.do_run(src, 'time: ') # compilation check, mainly
+
def test_intentional_fault(self):
if Settings.ASM_JS: return self.skip('no throw support in asm')
# Some programs intentionally segfault themselves, we should compile that into a throw