test: scope bash guard assertion to configured cmd
This commit is contained in:
parent
6b71292dd1
commit
018299fb48
|
|
@ -74,7 +74,11 @@ mod tests {
|
|||
) {
|
||||
let opts = Opts { cmd, hook, echo, resolve_symlinks };
|
||||
let source = Bash(&opts).render().unwrap();
|
||||
assert!(source.contains("[[ -n ${__zoxide_result} ]] || return"));
|
||||
if cmd.is_some() {
|
||||
assert!(source.contains("[[ -n ${__zoxide_result} ]] || return"));
|
||||
} else {
|
||||
assert!(!source.contains("[[ -n ${__zoxide_result} ]] || return"));
|
||||
}
|
||||
}
|
||||
|
||||
#[apply(opts)]
|
||||
|
|
|
|||
Loading…
Reference in New Issue