fabro/lib/crates/fabro-cli/tests/it/cmd/top_level.rs
Bryan Helmkamp 3945c1e902 Move cli.rs and scenario.rs tests into per-subcommand cmd/ files
Redistribute all tests from the monolithic cli.rs (2190 lines) and the
standalone tests from scenario.rs into their respective cmd/ files,
completing the migration to the one-file-per-subcommand structure.

- Delete cli.rs entirely; move tests to cmd/{run,config,llm,exec,doctor,serve}.rs
- Move scenario.rs standalone tests to cmd/{repo,secret,workflow,doctor}.rs
- Slim scenario.rs to only 6 parametrized E2E workflow scenarios + run lifecycle
- Create new cmd/serve.rs and cmd/workflow.rs modules
- Remove duplicate tests already covered by snapshot tests

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-30 11:37:24 -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'.
");
}