T16: a shell saves only when the running user may run it, as access answers, ACLs too, found at a full path or in one of PATH's full folders, never a relative one; a session runs that same full path, so the check and the start agree
This commit is contained in:
4 files changed
+87
-33
No files matched your search
@@ -247,6 +247,14 @@ fn powershell_reports_its_folder_byte_for_byte_and_keeps_the_status() {
|
||||
run.finish();
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn a_shell_named_bare_runs_from_its_full_path() {
|
||||
let started = launch("sh", PathBuf::from("/"), Path::new("/nonexistent")).expect("a launch");
|
||||
let (program, _) = started.program.expect("a program");
|
||||
assert!(Path::new(&program).is_absolute(), "{program}");
|
||||
assert!(launch("no-such-shell", PathBuf::from("/"), Path::new("/")).is_err());
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn an_unknown_shell_starts_without_integration() {
|
||||
let dir = PathBuf::from("/nonexistent");
|
||||
|
||||
Reference in new issue
Block a user