lsp_keywords.carbon 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  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_keywords.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_keywords.carbon
  9. // --- STDIN
  10. [[@LSP:foo:]]
  11. [[@LSP:foo]]
  12. [[@LSP:bar:content]]
  13. [[@LSP:baz:
  14. multi
  15. line
  16. ]]
  17. [[@LSP-CALL:bar:content]]
  18. [[@LSP-CALL:baz:
  19. multi
  20. line]]
  21. [[@LSP-REPLY:7]]
  22. [[@LSP-REPLY:8:bar]]
  23. [[@LSP-NOTIFY:exit]]
  24. // --- AUTOUPDATE-SPLIT
  25. // CHECK:STDERR: --- STDIN:
  26. // CHECK:STDERR: Content-Length: 37
  27. // CHECK:STDERR:
  28. // CHECK:STDERR: {"jsonrpc": "2.0", "method": "foo"}
  29. // CHECK:STDERR:
  30. // CHECK:STDERR: Content-Length: 37
  31. // CHECK:STDERR:
  32. // CHECK:STDERR: {"jsonrpc": "2.0", "method": "foo"}
  33. // CHECK:STDERR:
  34. // CHECK:STDERR: Content-Length: 46
  35. // CHECK:STDERR:
  36. // CHECK:STDERR: {"jsonrpc": "2.0", "method": "bar", content}
  37. // CHECK:STDERR:
  38. // CHECK:STDERR: Content-Length: 50
  39. // CHECK:STDERR:
  40. // CHECK:STDERR: {"jsonrpc": "2.0", "method": "baz",
  41. // CHECK:STDERR: multi
  42. // CHECK:STDERR: line
  43. // CHECK:STDERR: }
  44. // CHECK:STDERR:
  45. // CHECK:STDERR: Content-Length: 67
  46. // CHECK:STDERR:
  47. // CHECK:STDERR: {"jsonrpc": "2.0", "method": "bar", "id": 1, "params": {content}}
  48. // CHECK:STDERR:
  49. // CHECK:STDERR: Content-Length: 71
  50. // CHECK:STDERR:
  51. // CHECK:STDERR: {"jsonrpc": "2.0", "method": "baz", "id": 2, "params": {
  52. // CHECK:STDERR: multi
  53. // CHECK:STDERR: line}}
  54. // CHECK:STDERR:
  55. // CHECK:STDERR: Content-Length: 31
  56. // CHECK:STDERR:
  57. // CHECK:STDERR: {"jsonrpc": "2.0", "id": "7"}
  58. // CHECK:STDERR:
  59. // CHECK:STDERR: Content-Length: 48
  60. // CHECK:STDERR:
  61. // CHECK:STDERR: {"jsonrpc": "2.0", "id": "8", "result": {bar}}
  62. // CHECK:STDERR:
  63. // CHECK:STDERR: Content-Length: 38
  64. // CHECK:STDERR:
  65. // CHECK:STDERR: {"jsonrpc": "2.0", "method": "exit"}
  66. // CHECK:STDERR:
  67. // CHECK:STDERR:
  68. // CHECK:STDOUT: 1 args: `default_args`