diff options
author | Anton L. Šijanec <sijanecantonluka@gmail.com> | 2020-05-16 19:35:55 +0200 |
---|---|---|
committer | Anton L. Šijanec <sijanecantonluka@gmail.com> | 2020-05-16 19:35:55 +0200 |
commit | 587f44fd93a0024500418ce25bf01d0f177644f4 (patch) | |
tree | 13a981e5bc369cca8cc99ad9547d54b4c76673f5 /test/joinarray.c | |
parent | fix to allow nested commands (diff) | |
download | bverbose-587f44fd93a0024500418ce25bf01d0f177644f4.tar bverbose-587f44fd93a0024500418ce25bf01d0f177644f4.tar.gz bverbose-587f44fd93a0024500418ce25bf01d0f177644f4.tar.bz2 bverbose-587f44fd93a0024500418ce25bf01d0f177644f4.tar.lz bverbose-587f44fd93a0024500418ce25bf01d0f177644f4.tar.xz bverbose-587f44fd93a0024500418ce25bf01d0f177644f4.tar.zst bverbose-587f44fd93a0024500418ce25bf01d0f177644f4.zip |
Diffstat (limited to '')
-rw-r--r-- | test/joinarray.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/test/joinarray.c b/test/joinarray.c new file mode 100644 index 0000000..5c81a65 --- /dev/null +++ b/test/joinarray.c @@ -0,0 +1,13 @@ +#include <stdlib.h> +#include <stdio.h> +#include <limits.h> +#include <joinarrays.c> +// do not use this, it is idiotic, you have strlcpy! +extern int main(int argc, char* argv[]) { + char a1[3] = {1, 2, 3}; + char a2[5] = {4, 5, 6, 7, 8}; + int * joined = join_null_terminated_arrays(a1, a2); + joined[8] = '\n'; + fprintf(stdout, "%ld\n", joined); + return 0; +} |