31 lines
744 B
Rust
31 lines
744 B
Rust
use assert_cmd::Command;
|
|
use predicates::str::contains;
|
|
|
|
#[test]
|
|
fn completions_bash_emits_script() {
|
|
Command::cargo_bin("relicario").unwrap()
|
|
.args(["completions", "bash"])
|
|
.assert()
|
|
.success()
|
|
.stdout(contains("_relicario"))
|
|
.stdout(contains("complete -F"));
|
|
}
|
|
|
|
#[test]
|
|
fn completions_zsh_emits_script() {
|
|
Command::cargo_bin("relicario").unwrap()
|
|
.args(["completions", "zsh"])
|
|
.assert()
|
|
.success()
|
|
.stdout(contains("#compdef relicario"));
|
|
}
|
|
|
|
#[test]
|
|
fn completions_fish_emits_script() {
|
|
Command::cargo_bin("relicario").unwrap()
|
|
.args(["completions", "fish"])
|
|
.assert()
|
|
.success()
|
|
.stdout(contains("complete -c relicario"));
|
|
}
|