Merge branch 'project-diagnostics-pinned-tab' into style-project-diagnostics
This commit is contained in:
commit
c9b4bb78f2
13 changed files with 118 additions and 70 deletions
|
@ -378,6 +378,10 @@ mod tests {
|
|||
.read(cx)
|
||||
.active_item()
|
||||
.unwrap()
|
||||
.to_any()
|
||||
.downcast::<Editor>()
|
||||
.unwrap()
|
||||
.read(cx)
|
||||
.title(cx),
|
||||
"a.txt"
|
||||
);
|
||||
|
@ -408,6 +412,10 @@ mod tests {
|
|||
.read(cx)
|
||||
.active_item()
|
||||
.unwrap()
|
||||
.to_any()
|
||||
.downcast::<Editor>()
|
||||
.unwrap()
|
||||
.read(cx)
|
||||
.title(cx),
|
||||
"b.txt"
|
||||
);
|
||||
|
@ -491,14 +499,14 @@ mod tests {
|
|||
});
|
||||
|
||||
editor.update(&mut cx, |editor, cx| {
|
||||
assert!(!editor.is_dirty(cx.as_ref()));
|
||||
assert_eq!(editor.title(cx.as_ref()), "untitled");
|
||||
assert!(!editor.is_dirty(cx));
|
||||
assert_eq!(editor.title(cx), "untitled");
|
||||
assert!(Arc::ptr_eq(
|
||||
editor.language(cx).unwrap(),
|
||||
&language::PLAIN_TEXT
|
||||
));
|
||||
editor.handle_input(&editor::Input("hi".into()), cx);
|
||||
assert!(editor.is_dirty(cx.as_ref()));
|
||||
assert!(editor.is_dirty(cx));
|
||||
});
|
||||
|
||||
// Save the buffer. This prompts for a filename.
|
||||
|
@ -509,7 +517,7 @@ mod tests {
|
|||
});
|
||||
cx.read(|cx| {
|
||||
assert!(editor.is_dirty(cx));
|
||||
assert_eq!(editor.title(cx), "untitled");
|
||||
assert_eq!(editor.read(cx).title(cx), "untitled");
|
||||
});
|
||||
|
||||
// When the save completes, the buffer's title is updated and the language is assigned based
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue