diff options
Diffstat (limited to 'meson/test cases/common/41 test args/cmd_args.c')
-rw-r--r-- | meson/test cases/common/41 test args/cmd_args.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/meson/test cases/common/41 test args/cmd_args.c b/meson/test cases/common/41 test args/cmd_args.c new file mode 100644 index 000000000..545b795c5 --- /dev/null +++ b/meson/test cases/common/41 test args/cmd_args.c @@ -0,0 +1,18 @@ +#include<stdio.h> +#include<string.h> + +int main(int argc, char **argv) { + if(argc != 3) { + fprintf(stderr, "Incorrect number of arguments.\n"); + return 1; + } + if(strcmp(argv[1], "first") != 0) { + fprintf(stderr, "First argument is wrong.\n"); + return 1; + } + if(strcmp(argv[2], "second") != 0) { + fprintf(stderr, "Second argument is wrong.\n"); + return 1; + } + return 0; +} |