summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNico Weber <nicolasweber@gmx.de>2019-10-14 01:00:33 +0000
committerNico Weber <nicolasweber@gmx.de>2019-10-14 01:00:33 +0000
commit3e54997e777f699770d15f0feba060d3ac651f6b (patch)
tree3564a04a01bd9bcd89dd73df29161c714782d015
parentc445c0cb0aba8044c7a60ec49b52b66ce354c6bc (diff)
downloadbcm5719-llvm-3e54997e777f699770d15f0feba060d3ac651f6b.tar.gz
bcm5719-llvm-3e54997e777f699770d15f0feba060d3ac651f6b.zip
Make code-action-request.test and request-reply.test pass on Windows.
clangd's test:// scheme expands to /clangd-test on non-Win and to C:/clang-test on Win, so it can't be mixed freely with file:///clangd-test since that's wrong on Windows. This makes both tests consistenly use the test:// scheme. (Alternatively, we could use the //INPUT_DIR pattern used in a few other tests.) Part of PR43592. llvm-svn: 374746
-rw-r--r--clang-tools-extra/clangd/test/code-action-request.test6
-rw-r--r--clang-tools-extra/clangd/test/request-reply.test4
2 files changed, 5 insertions, 5 deletions
diff --git a/clang-tools-extra/clangd/test/code-action-request.test b/clang-tools-extra/clangd/test/code-action-request.test
index c64019e8215..78e90ce6c42 100644
--- a/clang-tools-extra/clangd/test/code-action-request.test
+++ b/clang-tools-extra/clangd/test/code-action-request.test
@@ -32,7 +32,7 @@
# CHECK-NEXT: {
# CHECK-NEXT: "arguments": [
# CHECK-NEXT: {
-# CHECK-NEXT: "file": "file:///clangd-test/main.cpp",
+# CHECK-NEXT: "file": "file://{{.*}}/clangd-test/main.cpp",
# CHECK-NEXT: "selection": {
# CHECK-NEXT: "end": {
# CHECK-NEXT: "character": 4,
@@ -51,7 +51,7 @@
# CHECK-NEXT: }
# CHECK-NEXT: ]
---
-{"jsonrpc":"2.0","id":4,"method":"workspace/executeCommand","params":{"command":"clangd.applyTweak","arguments":[{"file":"file:///clangd-test/main.cpp","selection":{"end":{"character":4,"line":0},"start":{"character":0,"line":0}},"tweakID":"ExpandAutoType"}]}}
+{"jsonrpc":"2.0","id":4,"method":"workspace/executeCommand","params":{"command":"clangd.applyTweak","arguments":[{"file":"test:///main.cpp","selection":{"end":{"character":4,"line":0},"start":{"character":0,"line":0}},"tweakID":"ExpandAutoType"}]}}
# CHECK: "newText": "int",
# CHECK-NEXT: "range": {
# CHECK-NEXT: "end": {
@@ -67,4 +67,4 @@
{"jsonrpc":"2.0","id":4,"method":"shutdown"}
---
{"jsonrpc":"2.0","method":"exit"}
---- \ No newline at end of file
+---
diff --git a/clang-tools-extra/clangd/test/request-reply.test b/clang-tools-extra/clangd/test/request-reply.test
index ce733fdfd9f..08e1c6c69f8 100644
--- a/clang-tools-extra/clangd/test/request-reply.test
+++ b/clang-tools-extra/clangd/test/request-reply.test
@@ -3,7 +3,7 @@
---
{"jsonrpc":"2.0","method":"textDocument/didOpen","params":{"textDocument":{"uri":"test:///main.cpp","languageId":"cpp","version":1,"text":"auto i = 0;"}}}
---
-{"jsonrpc":"2.0","id":4,"method":"workspace/executeCommand","params":{"command":"clangd.applyTweak","arguments":[{"file":"file:///clangd-test/main.cpp","selection":{"end":{"character":4,"line":0},"start":{"character":0,"line":0}},"tweakID":"ExpandAutoType"}]}}
+{"jsonrpc":"2.0","id":4,"method":"workspace/executeCommand","params":{"command":"clangd.applyTweak","arguments":[{"file":"test:///main.cpp","selection":{"end":{"character":4,"line":0},"start":{"character":0,"line":0}},"tweakID":"ExpandAutoType"}]}}
# CHECK: "id": 0,
# CHECK: "method": "workspace/applyEdit",
# CHECK: "newText": "int",
@@ -25,7 +25,7 @@
# CHECK-NEXT: },
# CHECK-NEXT: "id": 4,
---
-{"jsonrpc":"2.0","id":5,"method":"workspace/executeCommand","params":{"command":"clangd.applyTweak","arguments":[{"file":"file:///clangd-test/main.cpp","selection":{"end":{"character":4,"line":0},"start":{"character":0,"line":0}},"tweakID":"ExpandAutoType"}]}}
+{"jsonrpc":"2.0","id":5,"method":"workspace/executeCommand","params":{"command":"clangd.applyTweak","arguments":[{"file":"test:///main.cpp","selection":{"end":{"character":4,"line":0},"start":{"character":0,"line":0}},"tweakID":"ExpandAutoType"}]}}
# CHECK: "id": 1,
# CHECK: "method": "workspace/applyEdit",
---
OpenPOWER on IntegriCloud