1 // RUN: %clangxx -g %s -o %t && %run %t 2 3 #include <assert.h> 4 #include <stdio.h> 5 main(int argc,char ** argv)6int main(int argc, char **argv) { 7 FILE *fp = fopen(argv[0], "r"); 8 assert(fp); 9 10 char buf[2]; 11 char *s = fgets(buf, sizeof(buf), fp); 12 assert(s); 13 14 assert(!fclose(fp)); 15 return 0; 16 } 17