chore: fix servertest_init_exit
This commit is contained in:
parent
d503fe6d13
commit
37f5be1b26
2 changed files with 4 additions and 0 deletions
|
|
@ -42,6 +42,9 @@ def writeNotification (n : Notification α) : IpcM Unit := do
|
|||
def readMessage : IpcM JsonRpc.Message := do
|
||||
(←stdout).readLspMessage
|
||||
|
||||
def readRequestAs (expectedMethod : String) (α) [FromJson α] : IpcM (Request α) := do
|
||||
(←stdout).readLspRequestAs expectedMethod α
|
||||
|
||||
def readResponseAs (expectedID : RequestID) (α) [FromJson α] : IpcM (Response α) := do
|
||||
(←stdout).readLspResponseAs expectedID α
|
||||
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ def main : IO Unit := do
|
|||
hIn.write (←FS.readBinFile "init_vscode_1_47_2.log")
|
||||
hIn.flush
|
||||
let initResp ← Ipc.readResponseAs 0 InitializeResult
|
||||
let regWatchReq ← Ipc.readRequestAs "client/registerCapability" Json
|
||||
Ipc.writeNotification ⟨"initialized", InitializedParams.mk⟩
|
||||
|
||||
Ipc.writeRequest ⟨1, "shutdown", Json.null⟩
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue