commit 2eb79037ab636f1babd53d73c289a61a2e01fc35
parent 2420038d66db4e3ae2ad55e8579052b31bf27c1a
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date: Wed, 17 Nov 2021 14:13:15 +0100
tests/cc: Add 0196-invalidchar.c test
Diffstat:
2 files changed, 36 insertions(+), 0 deletions(-)
diff --git a/tests/cc/execute/0196-invalidchar.c b/tests/cc/execute/0196-invalidchar.c
@@ -0,0 +1,35 @@
+int
+main(void) {
+ static struct {
+ char *name;
+ const int offhour;
+ } tzones[] = {
+ { "CDT", -5 * 3600 },
+ { "CST", -6 * 3600 },
+ { "EDT", -4 * 3600 },
+ { "EST", -5 * 3600 },
+ { "MDT", -6 * 3600 },
+ { "MST", -7 * 3600 },
+ { "PDT", -7 * 3600 },
+ { "PST", -8 * 3600 },
+ };
+
+ if (tzones[0].offhour != -18000)
+ return 1;
+ if (tzones[1].offhour != -21600)
+ return 2;
+ if (tzones[2].offhour != -14400)
+ return 3;
+ if (tzones[3].offhour != -18000)
+ return 4;
+ if (tzones[4].offhour != -21600)
+ return 5;
+ if (tzones[5].offhour != -25200)
+ return 6;
+ if (tzones[6].offhour != -25200)
+ return 7;
+ if (tzones[7].offhour != -28800)
+ return 8;
+
+ return 0;
+}
diff --git a/tests/cc/execute/scc-tests.lst b/tests/cc/execute/scc-tests.lst
@@ -186,3 +186,4 @@
0193-incomplete.c
0194-vararg.c
0195-unexpected.c
+0196-invalidchar.c