scc

simple c99 compiler
git clone git://git.simple-cc.org/scc
Log | Files | Refs | Submodules | README | LICENSE

commit 29af9b741e8e4f568d86477d1350e5131be79f46
parent 556109d57f619410be0cc46b3f6043438e06016c
Author: Roberto E. Vargas Caballero <k0ga@shike2.net>
Date:   Mon, 13 Apr 2026 10:41:04 +0200

tests/cc: Add 0268-string execute test

Diffstat:
Atests/cc/execute/0268-string.c | 17+++++++++++++++++
Mtests/cc/execute/scc-tests.lst | 1+
2 files changed, 18 insertions(+), 0 deletions(-)

diff --git a/tests/cc/execute/0268-string.c b/tests/cc/execute/0268-string.c @@ -0,0 +1,17 @@ +unsigned char s1[] = "hello"; +signed char s2[] = "Hello"; +char s3[] = "Hello World!"; + +int +main() +{ + if (s1[1] != s2[1] || s1[1] != s3[1]) + return 1; + if (s1[2] != s2[2] || s1[2] != s3[2]) + return 2; + if (s1[3] != s2[3] || s1[3] != s3[3]) + return 3; + if (s1[4] != s2[4] || s1[4] != s3[4]) + return 4; + return 0; +} diff --git a/tests/cc/execute/scc-tests.lst b/tests/cc/execute/scc-tests.lst @@ -258,3 +258,4 @@ 0265-wchar.c 0266-wchar.c 0267-wchar.c +0268-string.c