Debian Codegraph @

clang-tools-extra/clangd/test/signature-help-unescaped.test

raw
1 # We specify a custom path in XDG_CONFIG_HOME, which only works on some systems.
2 # UNSUPPORTED: system-windows
3 # UNSUPPORTED: system-darwin
4
5 # RUN: mkdir -p %t/clangd
6
7 # Create a config file that configures to use CommentFormat Markdown.
8 # RUN: echo 'Documentation:' > %t/clangd/config.yaml
9 # RUN: echo ' CommentFormat: Markdown' >> %t/clangd/config.yaml
10 # RUN: env XDG_CONFIG_HOME=%t clangd -lit-test -enable-config < %s | FileCheck -strict-whitespace %s
11 # Start a session.
12 {"jsonrpc":"2.0","id":0,"method":"initialize","params":{"processId":123,"rootPath":"clangd","capabilities":{"textDocument": {"signatureHelp": {"signatureInformation": {"documentationFormat": ["markdown", "plaintext"]}}}},"trace":"off"}}
13 ---
14 {"jsonrpc":"2.0","method":"textDocument/didOpen","params":{"textDocument":{"uri":"test:///main.cpp","languageId":"cpp","version":1,"text":"// comment `markdown` _noescape_\nvoid x(int);\nint main(){\nx("}}}
15 ---
16 {"jsonrpc":"2.0","id":1,"method":"textDocument/signatureHelp","params":{"textDocument":{"uri":"test:///main.cpp"},"position":{"line":3,"character":2}}}
17 # CHECK: "id": 1,
18 # CHECK-NEXT: "jsonrpc": "2.0",
19 # CHECK-NEXT: "result": {
20 # CHECK-NEXT: "activeParameter": 0,
21 # CHECK-NEXT: "activeSignature": 0,
22 # CHECK-NEXT: "signatures": [
23 # CHECK-NEXT: {
24 # CHECK-NEXT: "documentation": {
25 # CHECK-NEXT: "kind": "markdown",
26 # CHECK-NEXT: "value": "comment `markdown` _noescape_"
27 # CHECK-NEXT: },
28 # CHECK-NEXT: "label": "x(int) -> void",
29 # CHECK-NEXT: "parameters": [
30 # CHECK-NEXT: {
31 # CHECK-NEXT: "label": "int"
32 # CHECK-NEXT: }
33 # CHECK-NEXT: ]
34 # CHECK-NEXT: }
35 # CHECK-NEXT: ]
36 # CHECK-NEXT: }
37 ---
38 {"jsonrpc":"2.0","id":100000,"method":"shutdown"}
39 ---
40 {"jsonrpc":"2.0","method":"exit"}