aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2012-12-20 14:43:16 -0800
committerAlon Zakai <alonzakai@gmail.com>2012-12-20 14:43:16 -0800
commit1a4c4fd9f3354aa06f885b3c843bc143ad534e1f (patch)
tree710d3f87da3bd534d5a24c5a557ebbf8d17c8c25 /tests
parent1c05b7a56995b8b6f91d67731a3e2d0c082c517c (diff)
timeb
Diffstat (limited to 'tests')
-rwxr-xr-xtests/runner.py19
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/runner.py b/tests/runner.py
index 63f435b2..ef5c8b68 100755
--- a/tests/runner.py
+++ b/tests/runner.py
@@ -3605,6 +3605,25 @@ The current type of b is: 9
extra_emscripten_args=['-H', 'libc/time.h'])
#extra_emscripten_args=['-H', 'libc/fcntl.h,libc/sys/unistd.h,poll.h,libc/math.h,libc/langinfo.h,libc/time.h'])
+ def test_timeb(self):
+ # Confirms they are called in reverse order
+ src = r'''
+ #include <stdio.h>
+ #include <assert.h>
+ #include <sys/timeb.h>
+
+ int main() {
+ timeb tb;
+ tb.timezone = 1;
+ printf("*%d\n", ftime(&tb));
+ assert(tb.time > 10000);
+ assert(tb.timezone == 0);
+ assert(tb.dstflag == 0);
+ return 0;
+ }
+ '''
+ self.do_run(src, '*0\n')
+
def test_intentional_fault(self):
# Some programs intentionally segfault themselves, we should compile that into a throw
src = r'''