Start fish in an isolated env

This commit is contained in:
Ajeet D'Souza 2020-12-12 02:09:37 +05:30
parent 14b150c1f7
commit 714ab9fbdd
1 changed files with 4 additions and 0 deletions

View File

@ -143,9 +143,13 @@ mod tests {
#[test]
fn fish_fish_#i() {
let opts = dbg!(&opts()[i]);
let home = tempfile::tempdir().unwrap();
let home = home.path();
let source = Fish(opts).render().unwrap();
Command::new("fish")
.args(&["--command", &source, "--private"])
.env_clear()
.env("HOME", home)
.assert()
.success()
.stdout("")