Skip to content
This repository has been archived by the owner on Dec 29, 2022. It is now read-only.

Commit

Permalink
Fix test learn_client_use_change_watched on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
alexheretic committed Jan 21, 2019
1 parent 9bbf3b9 commit c1f3c17
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/actions/notifications.rs
Original file line number Diff line number Diff line change
Expand Up @@ -299,20 +299,25 @@ mod test {

#[test]
fn learn_client_use_change_watched() {
let (project_root, lsp_project_manifest) = if cfg!(windows) {
("C:/some/dir", "file:c:/some/dir/Cargo.toml")
} else {
("/some/dir", "file:///some/dir/Cargo.toml")
};

let mut ctx = InitActionContext::new(
Arc::new(AnalysisHost::new(Target::Debug)),
Arc::new(Vfs::new()),
<_>::default(),
<_>::default(),
"/some/dir".into(),
project_root.into(),
123,
false,
);

assert!(!ctx.client_use_change_watched);

let manifest_change = Url::parse("file:///some/dir/Cargo.toml").unwrap();

let manifest_change = Url::parse(lsp_project_manifest).unwrap();
DidChangeWatchedFiles::handle(
DidChangeWatchedFilesParams {
changes: vec![FileEvent::new(manifest_change, FileChangeType::Changed)],
Expand Down

0 comments on commit c1f3c17

Please sign in to comment.