From fe876fcee6aeb755e4c6d3cffb04e7f668abd365 Mon Sep 17 00:00:00 2001 From: Yingchi Long Date: Thu, 27 Jul 2023 21:44:25 +0800 Subject: [PATCH] nixd: remove the test: goto-definition-updated.md --- .../nixd/test/goto-definition-updated.md | 120 ------------------ 1 file changed, 120 deletions(-) delete mode 100644 nixd/tools/nixd/test/goto-definition-updated.md diff --git a/nixd/tools/nixd/test/goto-definition-updated.md b/nixd/tools/nixd/test/goto-definition-updated.md deleted file mode 100644 index 25be40baf..000000000 --- a/nixd/tools/nixd/test/goto-definition-updated.md +++ /dev/null @@ -1,120 +0,0 @@ -# RUN: nixd --lit-test < %s | FileCheck %s - -<-- initialize(0) - -```json -{ - "jsonrpc":"2.0", - "id":0, - "method":"initialize", - "params":{ - "processId":123, - "rootPath":"", - "capabilities":{ - }, - "trace":"off" - } -} -``` - - -<-- textDocument/didOpen - -Testing this nix file: - -```nix -let -a = 1; -b = 2; -c = 3; -in -c -``` - -```json -{ - "jsonrpc": "2.0", - "method": "textDocument/didOpen", - "params": { - "textDocument": { - "uri": "file:///let.nix", - "languageId": "nix", - "version": 1, - "text": "let\na = 1;\nb = 2;\nc = 3;\nin\nc" - } - } -} -``` - - -```json -{ - "jsonrpc": "2.0", - "method": "textDocument/didChange", - "params": { - "textDocument": { - "uri": "file:///let.nix", - "version": 2 - }, - "contentChanges": [ - { - "range": { - "start": { - "line": 5, - "character": 0 - }, - "end": { - "line": 5, - "character": 1 - } - }, - "rangeLength": 1, - "text": "a" - } - ] - } -} -``` - - -<-- textDocument/definition(1) - -```json -{ - "jsonrpc":"2.0", - "id":1, - "method":"textDocument/definition", - "params":{ - "textDocument":{ - "uri":"file:///let.nix" - }, - "position":{ - "line":5, - "character":0 - } - } -} -``` - - -``` - CHECK: "id": 1, -CHECK-NEXT: "jsonrpc": "2.0", -CHECK-NEXT: "result": { -CHECK-NEXT: "range": { -CHECK-NEXT: "end": { -CHECK-NEXT: "character": 1, -CHECK-NEXT: "line": 1 -CHECK-NEXT: }, -CHECK-NEXT: "start": { -CHECK-NEXT: "character": 0, -CHECK-NEXT: "line": 1 -CHECK-NEXT: } -CHECK-NEXT: }, -CHECK-NEXT: "uri": "file:///let.nix" -CHECK-NEXT: } -``` - -```json -{"jsonrpc":"2.0","method":"exit"} -```