[clang-tidy][NFC]remove deps of clang in clang tidy test (#116588)
[llvm-project.git] / mlir / test / mlir-pdll-lsp-server / compilation_database.test
blobb861d7902c60edc8d610eaf8db92beed4134084a
1 // RUN: echo -e '--- !FileInfo:\n  filepath: "/foo.pdll"\n  includes: "%/S;%/S/../../include"' > %t.yml
2 // RUN: mlir-pdll-lsp-server -pdll-compilation-database=%t.yml -lit-test < %s | FileCheck %s
3 {"jsonrpc":"2.0","id":0,"method":"initialize","params":{"processId":123,"rootPath":"pdll","capabilities":{},"trace":"off"}}
4 // -----
5 {"jsonrpc":"2.0","method":"textDocument/didOpen","params":{"textDocument":{
6   "uri":"test:///foo.pdll",
7   "languageId":"pdll",
8   "version":1,
9   "text":"#include \"include/included.td\"\n#include \"include/included.pdll\""
10 }}}
11 // Check that we can properly process the includes without errors.
12 // CHECK: "method": "textDocument/publishDiagnostics",
13 // CHECK-NEXT: "params": {
14 // CHECK-NEXT:     "diagnostics": [],
15 // CHECK-NEXT:     "uri": "test:///foo.pdll",
16 // CHECK-NEXT:     "version": 1
17 // CHECK-NEXT:   }
18 // -----
19 {"jsonrpc":"2.0","id":7,"method":"shutdown"}
20 // -----
21 {"jsonrpc":"2.0","method":"exit"}