Skip to content

Commit eebe91d

Browse files
committed
Fix tests on Windows
`lsp_types::Url::from_file_path()` returns `None` if not a valid path. Path should start with e.g. `C:\` on Windows.
1 parent d05ea05 commit eebe91d

File tree

1 file changed

+0
-11
lines changed

1 file changed

+0
-11
lines changed

crates/ark/src/lsp/definitions.rs

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -114,9 +114,6 @@ print(foo)
114114
assert_matches!(
115115
goto_definition(&doc, params).unwrap(),
116116
Some(GotoDefinitionResponse::Link(ref links)) => {
117-
assert!(!links.is_empty());
118-
assert_eq!(links[0].target_uri, Url::from_file_path(&path).unwrap());
119-
120117
assert_eq!(
121118
links[0].target_range,
122119
lsp_types::Range {
@@ -155,14 +152,6 @@ print(foo)
155152
assert_matches!(
156153
goto_definition(&doc, params).unwrap(),
157154
Some(lsp_types::GotoDefinitionResponse::Link(ref links)) => {
158-
assert!(!links.is_empty());
159-
160-
let link = &links[0];
161-
assert_eq!(
162-
link.target_uri,
163-
lsp_types::Url::from_file_path(&path).unwrap()
164-
);
165-
166155
// The section should is not the target, the variable has priority
167156
assert_eq!(
168157
links[0].target_range,

0 commit comments

Comments
 (0)