1 // RUN: mlir-lsp-server -lit-test < %s | FileCheck -strict-whitespace %s
2 {"jsonrpc":"2.0","id":0,"method":"initialize","params":{"processId":123,"rootPath":"mlir","capabilities":{},"trace":"off"}}
4 {"jsonrpc":"2.0","method":"textDocument/didOpen","params":{"textDocument":{
5 "uri":"test:///foo.mlir",
10 // CHECK: "method": "textDocument/publishDiagnostics",
11 // CHECK-NEXT: "params": {
12 // CHECK-NEXT: "diagnostics": [
14 // CHECK-NEXT: "category": "Parse Error",
15 // CHECK-NEXT: "message": "custom op 'func.func' expected valid '@'-identifier for symbol name",
16 // CHECK-NEXT: "range": {
17 // CHECK-NEXT: "end": {
18 // CHECK-NEXT: "character": 12,
19 // CHECK-NEXT: "line": 0
21 // CHECK-NEXT: "start": {
22 // CHECK-NEXT: "character": 10,
23 // CHECK-NEXT: "line": 0
26 // CHECK-NEXT: "severity": 1,
27 // CHECK-NEXT: "source": "mlir"
30 // CHECK-NEXT: "uri": "test:///foo.mlir",
31 // CHECK-NEXT: "version": 1
34 {"jsonrpc":"2.0","method":"textDocument/didOpen","params":{"textDocument":{
35 "uri":"test:///foo.mlir",
40 // CHECK: "method": "textDocument/publishDiagnostics",
41 // CHECK-NEXT: "params": {
42 // CHECK-NEXT: "diagnostics": [
44 // CHECK-NEXT: "category": "Parse Error",
45 // CHECK-NEXT: "message": "empty operation name is invalid",
46 // CHECK-NEXT: "range": {
47 // CHECK-NEXT: "end": {
48 // CHECK-NEXT: "character": 2,
49 // CHECK-NEXT: "line": 0
51 // CHECK-NEXT: "start": {
52 // CHECK-NEXT: "character": 0,
53 // CHECK-NEXT: "line": 0
56 // CHECK-NEXT: "severity": 1,
57 // CHECK-NEXT: "source": "mlir"
60 // CHECK-NEXT: "uri": "test:///foo.mlir",
61 // CHECK-NEXT: "version": 1
64 {"jsonrpc":"2.0","id":3,"method":"shutdown"}
66 {"jsonrpc":"2.0","method":"exit"}