Merge main into branch
This commit is contained in:
commit
7111576986
100 changed files with 2312 additions and 1155 deletions
|
@ -742,4 +742,28 @@ mod alacritty_unix {
|
|||
pub fn default_shell(pw: &Passwd<'_>) -> Program {
|
||||
Program::Just(env::var("SHELL").unwrap_or_else(|_| pw.shell.to_owned()))
|
||||
}
|
||||
|
||||
//Active entry with a work tree, worktree is a file, integration test with the strategy interface
|
||||
#[gpui::test]
|
||||
async fn active_entry_worktree_is_file_int(cx: &mut TestAppContext) {
|
||||
//Setup variables
|
||||
let mut cx = TerminalTestContext::new(cx, true);
|
||||
let (project, workspace) = cx.blank_workspace().await;
|
||||
let (_wt, _entry) = cx.create_folder_wt(project.clone(), "/root1/").await;
|
||||
let (wt2, entry2) = cx.create_file_wt(project.clone(), "/root2.txt").await;
|
||||
cx.insert_active_entry_for(wt2, entry2, project.clone());
|
||||
|
||||
//Test
|
||||
cx.cx.update(|cx| {
|
||||
let workspace = workspace.read(cx);
|
||||
let active_entry = project.read(cx).active_entry();
|
||||
|
||||
assert!(active_entry.is_some());
|
||||
|
||||
let res =
|
||||
get_working_directory(workspace, cx, WorkingDirectory::CurrentProjectDirectory);
|
||||
let first = first_project_directory(workspace, cx);
|
||||
assert_eq!(res, first);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue