mirror of
https://github.com/fabro-sh/fabro.git
synced 2026-09-07 08:27:12 +00:00
33 lines
751 B
Rust
33 lines
751 B
Rust
use fabro_test::{fabro_snapshot, test_context};
|
|
|
|
#[test]
|
|
fn version() {
|
|
let context = test_context!();
|
|
let mut cmd = context.command();
|
|
cmd.arg("--version");
|
|
fabro_snapshot!(context.filters(), cmd, @"
|
|
success: true
|
|
exit_code: 0
|
|
----- stdout -----
|
|
fabro [VERSION] ([BUILD])
|
|
----- stderr -----
|
|
");
|
|
}
|
|
|
|
#[test]
|
|
fn no_dotenv_flag() {
|
|
let context = test_context!();
|
|
let mut cmd = context.command();
|
|
cmd.args(["--no-dotenv", "doctor"]);
|
|
fabro_snapshot!(context.filters(), cmd, @"
|
|
success: false
|
|
exit_code: 2
|
|
----- stdout -----
|
|
----- stderr -----
|
|
error: unexpected argument '--no-dotenv' found
|
|
|
|
Usage: fabro [OPTIONS] [COMMAND]
|
|
|
|
For more information, try '--help'.
|
|
");
|
|
}
|