commit e76c262958171f2ab472c3b9d3e15720169c8bca parent eb615c0eb2360e33a9ebdf5febb5bc7116ffd672 Author: Roberto E. Vargas Caballero <k0ga@shike2.com> Date: Fri, 4 Nov 2022 05:26:04 +0100 test/cc: Add execute/0213-decay.c Diffstat:
A | tests/cc/execute/0213-decay.c | | | 21 | +++++++++++++++++++++ |
M | tests/cc/execute/scc-tests.lst | | | 1 | + |
2 files changed, 22 insertions(+), 0 deletions(-)
diff --git a/tests/cc/execute/0213-decay.c b/tests/cc/execute/0213-decay.c @@ -0,0 +1,21 @@ +int +f(char *v[]) +{ + char *s; + + s = v[0]; + + return s[0] == 's' && s[1] == 'h' && s[2] == '\0'; +} + +int +main() +{ + int n; + + n = f((char *[]) {"sh", "-c"}); + + if (!n) + return 1; + return 0; +} diff --git a/tests/cc/execute/scc-tests.lst b/tests/cc/execute/scc-tests.lst @@ -203,4 +203,5 @@ 0210-flexible.c 0211-enum.c 0212-krtypes.c +0213-decay.c [TODO] 0214-va_copy.c