[OptTable] Fix typo VALUE => VALUES (NFCI) (#121523)
[llvm-project.git] / compiler-rt / test / msan / Linux / glob_nomatch.cpp
blobfa132c8137278ab49dad55c2c6750c60a0b5610a
1 // RUN: %clangxx_msan -O0 %s -o %t && %run %t %p
2 // RUN: %clangxx_msan -O3 %s -o %t && %run %t %p
4 #include <assert.h>
5 #include <glob.h>
6 #include <stdio.h>
7 #include <stdlib.h>
9 int main(int argc, char *argv[]) {
10 assert(argc == 2);
11 char buf[1024];
12 snprintf(buf, sizeof(buf), "%s/%s", argv[1], "glob_test_root/*c");
14 glob_t globbuf;
15 int res = glob(buf, 0, 0, &globbuf);
16 assert(res == GLOB_NOMATCH);
17 assert(globbuf.gl_pathc == 0);
18 if (globbuf.gl_pathv == 0)
19 exit(0);
20 return 0;