STYLE: Nightly Date Stamp
[cmake.git] / Tests / CustomCommand / check_command_line.c.in
blobe0e0d21423712c246fccd37c919ba2bfeeb5fe91
1 #include <stdio.h>
2 #include <string.h>
4 const char* expected_arguments[] =
6 @EXPECTED_ARGUMENTS@ 0
7 };
9 int main(int argc, const char* argv[])
11 const char** a = argv+1;
12 const char** e = expected_arguments;
13 (void)argc;
14 for(;*a && *e; ++a, ++e)
16 if(strcmp(*a, *e) != 0)
18 fprintf(stderr, "Argument [%s] does not match expected [%s].\n",
19 *a, *e);
20 return 1;
22 else
24 #if defined(CHECK_COMMAND_LINE_VERBOSE)
25 printf("[%s]\n", *a);
26 #endif
29 if(*a || *e)
31 fprintf(stderr, "Number of arguments does not match expected.\n");
32 return 1;
34 printf("Command line escapes work!\n");
35 return 0;