aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rwxr-xr-xtests/runner.py5
-rw-r--r--tests/systypes/output.txt1
-rw-r--r--tests/systypes/src.c20
3 files changed, 26 insertions, 0 deletions
diff --git a/tests/runner.py b/tests/runner.py
index d9953c14..61c98e6b 100755
--- a/tests/runner.py
+++ b/tests/runner.py
@@ -3822,6 +3822,11 @@ def process(filename):
expected = open(path_from_root('tests', 'env', 'output.txt'), 'r').read()
self.do_run(src, expected)
+ def test_systypes(self):
+ src = open(path_from_root('tests', 'systypes', 'src.c'), 'r').read()
+ expected = open(path_from_root('tests', 'systypes', 'output.txt'), 'r').read()
+ self.do_run(src, expected)
+
def test_getloadavg(self):
src = r'''
#include <stdio.h>
diff --git a/tests/systypes/output.txt b/tests/systypes/output.txt
new file mode 100644
index 00000000..2e9ba477
--- /dev/null
+++ b/tests/systypes/output.txt
@@ -0,0 +1 @@
+success
diff --git a/tests/systypes/src.c b/tests/systypes/src.c
new file mode 100644
index 00000000..a01ed578
--- /dev/null
+++ b/tests/systypes/src.c
@@ -0,0 +1,20 @@
+#include <sys/types.h>
+
+// Declare puts manually, we don't want to include any other headers here
+#ifdef __cplusplus
+extern "C"
+#endif
+int puts(const char*);
+
+int main() {
+ int8_t i8 = 0;
+ u_int8_t ui8 = 0;
+ int16_t i16 = 0;
+ u_int16_t ui16 = 0;
+ int32_t i32 = 0;
+ u_int32_t ui32 = 0;
+ int64_t i64 = 0;
+ u_int64_t ui64 = 0;
+ puts("success");
+ return 0;
+}