1 [ 2 { 3 "directory": "/home/john.doe/MyProject", 4 "command": "clang++ -o project.o -c /home/john.doe/MyProject/project.cpp", 5 "file": "/home/john.doe/MyProject/project.cpp" 6 }, 7 { 8 "directory": "/home/john.doe/MyProjectA", 9 "command": "clang++ -o project2.o -c /home/john.doe/MyProject/project2.cpp", 10 "file": "/home/john.doe/MyProject/project2.cpp" 11 }, 12 { 13 "directory": "/home/john.doe/MyProjectB", 14 "command": "clang++ -DFEATURE=1 -o project2-feature.o -c /home/john.doe/MyProject/project2.cpp", 15 "file": "/home/john.doe/MyProject/project2.cpp" 16 } 17 ] 18 # RUN: c-index-test -compilation-db %s 19 # RUN: c-index-test -compilation-db lookup file_does_not_exists.cpp %s | FileCheck -check-prefix=FILE-NOT-FOUND %s 20 # FILE-NOT-FOUND: file file_does_not_exists.cpp not found in compilation db 21 22 # RUN: c-index-test -compilation-db lookup /home/john.doe/MyProject/project.cpp %s | FileCheck -check-prefix=FILE-1-CMD %s 23 # FILE-1-CMD: workdir:'/home/john.doe/MyProject' cmdline:'clang++ -o project.o -c /home/john.doe/MyProject/project.cpp' 24 25 # RUN: c-index-test -compilation-db lookup /home/john.doe/MyProject/project2.cpp %s | FileCheck -check-prefix=FILE-2-CMD %s 26 # FILE-2-CMD: workdir:'/home/john.doe/MyProjectA' cmdline:'clang++ -o project2.o -c /home/john.doe/MyProject/project2.cpp' 27 # FILE-2-CMD: workdir:'/home/john.doe/MyProjectB' cmdline:'clang++ -DFEATURE=1 -o project2-feature.o -c /home/john.doe/MyProject/project2.cpp' 28