CodeQL / Analyze (actions) (push) Canceled after 0s
CodeQL / Analyze (python) (push) Canceled after 0s
pre-commit / pre-commit (push) Canceled after 0s
Multi-Arch CI / setup (push) Canceled after 0s
Publish build_manylinux_x86_64 images / publish_build_manylinux_x86_64 (push) Canceled after 0s
Setup (Multi-Arch) / setup (push) Canceled after 0s
Multi-Arch CI / Linux::${{ fromJSON(needs.setup.outputs.linux_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubi10 image / publish_no_rocm_image_ubi10 (push) Canceled after 0s
Multi-Arch CI / Windows::${{ fromJSON(needs.setup.outputs.windows_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Multi-Arch CI / Manifest Diff (push) Canceled after 0s
TheRock Manifest Diff Report / Generate Manifest Diff Report (push) Canceled after 0s
Multi-Arch CI / CI Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_ocl_rt images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_rocgdb images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Unit Tests / Unit Tests :: ubuntu-24.04 (push) Canceled after 0s
Unit Tests / Unit Tests :: windows-2022 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_media (push) Canceled after 0s
Unit Tests / Unit Tests Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_openmpi (push) Canceled after 0s
114 lines
4.5 KiB
Plaintext
114 lines
4.5 KiB
Plaintext
# RUN: not clangd -pretty -sync -enable-test-uri-scheme < %s | FileCheck -strict-whitespace %s
|
|
# RUN: not clangd -pretty -sync -enable-test-uri-scheme < %s 2>&1 | FileCheck -check-prefix=STDERR %s
|
|
# vim: fileformat=dos
|
|
# It is absolutely vital that this file has CRLF line endings.
|
|
#
|
|
# Note that we invert the test because we intent to let clangd exit prematurely.
|
|
#
|
|
# Test protocol parsing
|
|
Content-Length: 125
|
|
Content-Type: application/vscode-jsonrpc; charset-utf-8
|
|
|
|
{"jsonrpc":"2.0","id":0,"method":"initialize","params":{"processId":123,"rootPath":"clangd","capabilities":{},"trace":"off"}}
|
|
# Test message with Content-Type after Content-Length
|
|
#
|
|
# CHECK: "jsonrpc": "2.0",
|
|
# CHECK-NEXT: "result": {
|
|
# CHECK: }
|
|
Content-Length: 246
|
|
|
|
{"jsonrpc":"2.0","method":"textDocument/didOpen","params":{"textDocument":{"uri":"test:///main.cpp","languageId":"cpp","version":1,"text":"struct fake { int a, bb, ccc; int f(int i, const float f) const; };\nint main() {\n fake f;\n f.\n}\n"}}}
|
|
|
|
Content-Length: 104
|
|
|
|
{"jsonrpc":"2.0","method":"textDocument/didChange","params":{"textDocument":{"uri":"test:///main.cpp"}}}
|
|
|
|
Content-Type: application/vscode-jsonrpc; charset-utf-8
|
|
Content-Length: 146
|
|
|
|
{"jsonrpc":"2.0","id":1,"method":"textDocument/completion","params":{"textDocument":{"uri":"test:/main.cpp"},"position":{"line":3,"character":5}}}
|
|
# Test message with Content-Type before Content-Length
|
|
#
|
|
# CHECK: "id": 1,
|
|
# CHECK-NEXT: "jsonrpc": "2.0",
|
|
# CHECK-NEXT: "result": {
|
|
# CHECK-NEXT: "isIncomplete": false,
|
|
# CHECK-NEXT: "items": [
|
|
# CHECK: "filterText": "a",
|
|
# CHECK-NEXT: "insertText": "a",
|
|
# CHECK-NEXT: "insertTextFormat": 1,
|
|
# CHECK-NEXT: "kind": 5,
|
|
# CHECK-NEXT: "label": " a",
|
|
# CHECK-NEXT: "score": {{[0-9]+.[0-9]+}},
|
|
# CHECK-NEXT: "sortText": "{{.*}}"
|
|
# CHECK: ]
|
|
# CHECK-NEXT: }
|
|
|
|
X-Test: Testing
|
|
Content-Type: application/vscode-jsonrpc; charset-utf-8
|
|
Content-Length: 146
|
|
Content-Type: application/vscode-jsonrpc; charset-utf-8
|
|
X-Testing: Test
|
|
|
|
{"jsonrpc":"2.0","id":2,"method":"textDocument/completion","params":{"textDocument":{"uri":"test:/main.cpp"},"position":{"line":3,"character":5}}}
|
|
|
|
Content-Type: application/vscode-jsonrpc; charset-utf-8
|
|
Content-Length: 10
|
|
Content-Length: 146
|
|
|
|
{"jsonrpc":"2.0","id":3,"method":"textDocument/completion","params":{"textDocument":{"uri":"test:/main.cpp"},"position":{"line":3,"character":5}}}
|
|
# Test message with duplicate Content-Length headers
|
|
#
|
|
# CHECK: "id": 3,
|
|
# CHECK-NEXT: "jsonrpc": "2.0",
|
|
# CHECK-NEXT: "result": {
|
|
# CHECK-NEXT: "isIncomplete": false,
|
|
# CHECK-NEXT: "items": [
|
|
# CHECK: "filterText": "a",
|
|
# CHECK-NEXT: "insertText": "a",
|
|
# CHECK-NEXT: "insertTextFormat": 1,
|
|
# CHECK-NEXT: "kind": 5,
|
|
# CHECK-NEXT: "label": " a",
|
|
# CHECK-NEXT: "score": {{[0-9]+.[0-9]+}},
|
|
# CHECK-NEXT: "sortText": "{{.*}}"
|
|
# CHECK: ]
|
|
# CHECK-NEXT: }
|
|
# STDERR: Warning: Duplicate Content-Length header received. The previous value for this message (10) was ignored.
|
|
|
|
Content-Type: application/vscode-jsonrpc; charset-utf-8
|
|
Content-Length: 10
|
|
|
|
{"jsonrpc":"2.0","id":4,"method":"textDocument/completion","params":{"textDocument":{"uri":"test:/main.cpp"},"position":{"line":3,"character":5}}}
|
|
# Test message with malformed Content-Length
|
|
#
|
|
# STDERR: JSON parse error
|
|
# Ensure we recover by sending another (valid) message
|
|
|
|
Content-Length: 146
|
|
|
|
{"jsonrpc":"2.0","id":5,"method":"textDocument/completion","params":{"textDocument":{"uri":"test:/main.cpp"},"position":{"line":3,"character":5}}}
|
|
# Test message with Content-Type before Content-Length
|
|
#
|
|
# CHECK: "id": 5,
|
|
# CHECK-NEXT: "jsonrpc": "2.0",
|
|
# CHECK-NEXT: "result": {
|
|
# CHECK-NEXT: "isIncomplete": false,
|
|
# CHECK-NEXT: "items": [
|
|
# CHECK: "filterText": "a",
|
|
# CHECK-NEXT: "insertText": "a",
|
|
# CHECK-NEXT: "insertTextFormat": 1,
|
|
# CHECK-NEXT: "kind": 5,
|
|
# CHECK-NEXT: "label": " a",
|
|
# CHECK-NEXT: "score": {{[0-9]+.[0-9]+}},
|
|
# CHECK-NEXT: "sortText": "{{.*}}"
|
|
# CHECK: ]
|
|
# CHECK-NEXT: }
|
|
Content-Length: 1024
|
|
|
|
{"jsonrpc":"2.0","id":5,"method":"textDocument/completion","params":{"textDocument":{"uri":"test:/main.cpp"},"position":{"line":3,"character":5}}}
|
|
# Test message which reads beyond the end of the stream.
|
|
#
|
|
# Ensure this is the last test in the file!
|
|
# STDERR: Input was aborted. Read only {{[0-9]+}} bytes of expected {{[0-9]+}}.
|
|
|