diff options
author | Aleksey Kladov <[email protected]> | 2020-06-02 17:02:58 +0100 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2020-06-02 17:09:12 +0100 |
commit | bc3db7c1ded0db2d3804b5ac3e5c35dd53350228 (patch) | |
tree | be462be1360464d640d37332bbd436482ef5331a /crates/rust-analyzer/tests | |
parent | a83ab820a4633bac718ee0fd11f06d1b3142be6b (diff) |
Fix tests
Diffstat (limited to 'crates/rust-analyzer/tests')
-rw-r--r-- | crates/rust-analyzer/tests/heavy_tests/main.rs | 113 |
1 files changed, 59 insertions, 54 deletions
diff --git a/crates/rust-analyzer/tests/heavy_tests/main.rs b/crates/rust-analyzer/tests/heavy_tests/main.rs index 8b473ff74..e18f973b8 100644 --- a/crates/rust-analyzer/tests/heavy_tests/main.rs +++ b/crates/rust-analyzer/tests/heavy_tests/main.rs | |||
@@ -76,30 +76,33 @@ fn foo() { | |||
76 | server.request::<Runnables>( | 76 | server.request::<Runnables>( |
77 | RunnablesParams { text_document: server.doc_id("lib.rs"), position: None }, | 77 | RunnablesParams { text_document: server.doc_id("lib.rs"), position: None }, |
78 | json!([ | 78 | json!([ |
79 | { | 79 | { |
80 | "args": [ "test" ], | 80 | "args": { |
81 | "extraArgs": [ "foo", "--nocapture" ], | 81 | "cargoArgs": ["test"], |
82 | "kind": "cargo", | 82 | "executableArgs": ["foo", "--nocapture"], |
83 | "env": { "RUST_BACKTRACE": "short" }, | 83 | }, |
84 | "cwd": null, | 84 | "kind": "cargo", |
85 | "label": "test foo", | 85 | "label": "test foo", |
86 | "range": { | 86 | "location": { |
87 | "end": { "character": 1, "line": 2 }, | 87 | "targetRange": { |
88 | "start": { "character": 0, "line": 0 } | 88 | "end": { "character": 1, "line": 2 }, |
89 | } | 89 | "start": { "character": 0, "line": 0 } |
90 | }, | 90 | }, |
91 | { | 91 | "targetSelectionRange": { |
92 | "args": ["check", "--workspace"], | 92 | "end": { "character": 6, "line": 1 }, |
93 | "extraArgs": [], | 93 | "start": { "character": 3, "line": 1 } |
94 | "kind": "cargo", | 94 | }, |
95 | "env": {}, | 95 | "targetUri": "file:///[..]/lib.rs" |
96 | "cwd": null, | 96 | } |
97 | "label": "cargo check --workspace", | 97 | }, |
98 | "range": { | 98 | { |
99 | "end": { "character": 0, "line": 0 }, | 99 | "args": { |
100 | "start": { "character": 0, "line": 0 } | 100 | "cargoArgs": ["check", "--workspace"], |
101 | "executableArgs": [], | ||
102 | }, | ||
103 | "kind": "cargo", | ||
104 | "label": "cargo check --workspace" | ||
101 | } | 105 | } |
102 | } | ||
103 | ]), | 106 | ]), |
104 | ); | 107 | ); |
105 | } | 108 | } |
@@ -138,42 +141,44 @@ fn main() {} | |||
138 | server.request::<Runnables>( | 141 | server.request::<Runnables>( |
139 | RunnablesParams { text_document: server.doc_id("foo/tests/spam.rs"), position: None }, | 142 | RunnablesParams { text_document: server.doc_id("foo/tests/spam.rs"), position: None }, |
140 | json!([ | 143 | json!([ |
141 | { | 144 | { |
142 | "args": [ "test", "--package", "foo", "--test", "spam" ], | 145 | "args": { |
143 | "extraArgs": [ "test_eggs", "--exact", "--nocapture" ], | 146 | "cargoArgs": ["test", "--package", "foo", "--test", "spam"], |
144 | "kind": "cargo", | 147 | "executableArgs": ["test_eggs", "--exact", "--nocapture"], |
145 | "env": { "RUST_BACKTRACE": "short" }, | 148 | "workspaceRoot": server.path().join("foo") |
146 | "label": "test test_eggs", | ||
147 | "range": { | ||
148 | "end": { "character": 17, "line": 1 }, | ||
149 | "start": { "character": 0, "line": 0 } | ||
150 | }, | ||
151 | "cwd": server.path().join("foo") | ||
152 | }, | 149 | }, |
153 | { | 150 | "kind": "cargo", |
154 | "args": [ "check", "--package", "foo" ], | 151 | "label": "test test_eggs", |
155 | "extraArgs": [], | 152 | "location": { |
156 | "kind": "cargo", | 153 | "targetRange": { |
157 | "env": {}, | 154 | "end": { "character": 17, "line": 1 }, |
158 | "label": "cargo check -p foo", | ||
159 | "range": { | ||
160 | "end": { "character": 0, "line": 0 }, | ||
161 | "start": { "character": 0, "line": 0 } | 155 | "start": { "character": 0, "line": 0 } |
162 | }, | 156 | }, |
163 | "cwd": server.path().join("foo") | 157 | "targetSelectionRange": { |
164 | }, | 158 | "end": { "character": 12, "line": 1 }, |
165 | { | 159 | "start": { "character": 3, "line": 1 } |
166 | "args": [ "test", "--package", "foo" ], | ||
167 | "extraArgs": [], | ||
168 | "kind": "cargo", | ||
169 | "env": {}, | ||
170 | "label": "cargo test -p foo", | ||
171 | "range": { | ||
172 | "end": { "character": 0, "line": 0 }, | ||
173 | "start": { "character": 0, "line": 0 } | ||
174 | }, | 160 | }, |
175 | "cwd": server.path().join("foo") | 161 | "targetUri": "file:///[..]/tests/spam.rs" |
176 | } | 162 | } |
163 | }, | ||
164 | { | ||
165 | "args": { | ||
166 | "cargoArgs": ["check", "--package", "foo"], | ||
167 | "executableArgs": [], | ||
168 | "workspaceRoot": server.path().join("foo") | ||
169 | }, | ||
170 | "kind": "cargo", | ||
171 | "label": "cargo check -p foo" | ||
172 | }, | ||
173 | { | ||
174 | "args": { | ||
175 | "cargoArgs": ["test", "--package", "foo"], | ||
176 | "executableArgs": [], | ||
177 | "workspaceRoot": server.path().join("foo") | ||
178 | }, | ||
179 | "kind": "cargo", | ||
180 | "label": "cargo test -p foo" | ||
181 | } | ||
177 | ]), | 182 | ]), |
178 | ); | 183 | ); |
179 | } | 184 | } |