test cases/common/141 special characters/arg-string-test.c
raw| 1 | #include <assert.h> |
| 2 | #include <stdio.h> |
| 3 | #include <string.h> |
| 4 | |
| 5 | int main(int argc, char **argv) { |
| 6 | const char *s = CHAR; |
| 7 | assert(argc == 2); |
| 8 | assert(strlen(s) == 1); |
| 9 | if (s[0] != argv[1][0]) |
| 10 | fprintf(stderr, "Expected %x, got %x\n", (unsigned int) s[0], (unsigned int) argv[1][0]); |
| 11 | assert(s[0] == argv[1][0]); |
| 12 | return 0; |
| 13 | } |