use assert_cmd::Command;
pub fn lx() -> Command {
let mut cmd = Command::cargo_bin("lx").expect("binary lx not found");
cmd.env("LX_CONFIG", "/nonexistent")
.env("HOME", "/nonexistent");
cmd
}
pub fn lx_no_colour() -> Command {
let mut cmd = lx();
cmd.arg("--colour=never");
cmd
}
#[allow(dead_code)]
pub fn current_group() -> String {
use std::process::Command as StdCommand;
let output = StdCommand::new("id")
.arg("-gn")
.output()
.expect("failed to run id -gn");
String::from_utf8_lossy(&output.stdout).trim().to_string()
}