aboutsummaryrefslogtreecommitdiff
path: root/crates
diff options
context:
space:
mode:
Diffstat (limited to 'crates')
-rw-r--r--crates/assists/src/tests.rs8
1 files changed, 6 insertions, 2 deletions
diff --git a/crates/assists/src/tests.rs b/crates/assists/src/tests.rs
index d18e566e6..b41f4874a 100644
--- a/crates/assists/src/tests.rs
+++ b/crates/assists/src/tests.rs
@@ -123,8 +123,12 @@ fn check(handler: Handler, before: &str, expected: ExpectedResult, assist_label:
123 for file_system_edit in source_change.file_system_edits.clone() { 123 for file_system_edit in source_change.file_system_edits.clone() {
124 match file_system_edit { 124 match file_system_edit {
125 FileSystemEdit::CreateFile { dst, initial_contents } => { 125 FileSystemEdit::CreateFile { dst, initial_contents } => {
126 let target_dst = dst.path; 126 let sr = db.file_source_root(dst.anchor);
127 format_to!(buf, "//- {}\n", target_dst); 127 let sr = db.source_root(sr);
128 let mut base = sr.path_for_file(&dst.anchor).unwrap().clone();
129 base.pop();
130 let created_file_path = format!("{}{}", base.to_string(), &dst.path[1..]);
131 format_to!(buf, "//- {}\n", created_file_path);
128 buf.push_str(&initial_contents); 132 buf.push_str(&initial_contents);
129 } 133 }
130 _ => (), 134 _ => (),