lsp_calls.carbon 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. // Part of the Carbon Language project, under the Apache License v2.0 with LLVM
  2. // Exceptions. See /LICENSE for license information.
  3. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
  4. // AUTOUPDATE
  5. // TIP: To test this file alone, run:
  6. // TIP: bazel test //testing/file_test:file_test_base_test --test_arg=--file_tests=testing/file_test/testdata/lsp_calls.carbon
  7. // TIP: To dump output, run:
  8. // TIP: bazel run //testing/file_test:file_test_base_test -- --dump_output --file_tests=testing/file_test/testdata/lsp_calls.carbon
  9. // --- STDIN
  10. [[@LSP:foo:]]
  11. [[@LSP:foo]]
  12. [[@LSP:bar:content]]
  13. [[@LSP:baz:
  14. multi
  15. line
  16. ]]
  17. [[@LSP-REPLY:7]]
  18. [[@LSP-REPLY:8:bar]]
  19. [[@LSP-NOTIFY:exit]]
  20. // --- AUTOUPDATE-SPLIT
  21. // CHECK:STDERR: --- STDIN:
  22. // CHECK:STDERR: Content-Length: 48
  23. // CHECK:STDERR:
  24. // CHECK:STDERR: {"jsonrpc": "2.0", "id": "1", "method": "foo"}
  25. // CHECK:STDERR:
  26. // CHECK:STDERR: Content-Length: 48
  27. // CHECK:STDERR:
  28. // CHECK:STDERR: {"jsonrpc": "2.0", "id": "2", "method": "foo"}
  29. // CHECK:STDERR:
  30. // CHECK:STDERR: Content-Length: 57
  31. // CHECK:STDERR:
  32. // CHECK:STDERR: {"jsonrpc": "2.0", "id": "3", "method": "bar", content}
  33. // CHECK:STDERR:
  34. // CHECK:STDERR: Content-Length: 61
  35. // CHECK:STDERR:
  36. // CHECK:STDERR: {"jsonrpc": "2.0", "id": "4", "method": "baz",
  37. // CHECK:STDERR: multi
  38. // CHECK:STDERR: line
  39. // CHECK:STDERR: }
  40. // CHECK:STDERR:
  41. // CHECK:STDERR: Content-Length: 31
  42. // CHECK:STDERR:
  43. // CHECK:STDERR: {"jsonrpc": "2.0", "id": "7"}
  44. // CHECK:STDERR:
  45. // CHECK:STDERR: Content-Length: 36
  46. // CHECK:STDERR:
  47. // CHECK:STDERR: {"jsonrpc": "2.0", "id": "8", bar}
  48. // CHECK:STDERR:
  49. // CHECK:STDERR: Content-Length: 38
  50. // CHECK:STDERR:
  51. // CHECK:STDERR: {"jsonrpc": "2.0", "method": "exit"}
  52. // CHECK:STDERR:
  53. // CHECK:STDERR:
  54. // CHECK:STDOUT: 1 args: `default_args`