fabro/lib/apps/fabro-cli/tests/it/cmd/top_level.rs
2026-07-23 17:59:34 -04:00

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'.
");
}