use fabro_test::{fabro_snapshot, test_context}; #[test] fn help() { let context = test_context!(); let mut cmd = context.command(); cmd.args(["model", "test", "--help"]); fabro_snapshot!(context.filters(), cmd, @" success: true exit_code: 0 ----- stdout ----- Test model availability by sending a simple prompt Usage: fabro model test [OPTIONS] Options: --json Output as JSON [env: FABRO_JSON=] --server Fabro server target: http(s) URL or absolute Unix socket path [env: FABRO_SERVER=] --debug Enable DEBUG-level logging (default is INFO) [env: FABRO_DEBUG=] -p, --provider Filter by provider -m, --model Test a specific model --no-upgrade-check Disable automatic upgrade check [env: FABRO_NO_UPGRADE_CHECK=true] --deep Run a multi-turn tool-use test (catches reasoning round-trip bugs) --quiet Suppress non-essential output [env: FABRO_QUIET=] --verbose Enable verbose output [env: FABRO_VERBOSE=] -h, --help Print help ----- stderr ----- "); } #[test] fn model_test_unknown_model_errors() { let context = test_context!(); let mut cmd = context.command(); cmd.args(["model", "test", "--model", "nonexistent-model-xyz"]); fabro_snapshot!(context.filters(), cmd, @" success: false exit_code: 1 ----- stdout ----- ----- stderr ----- Testing nonexistent-model-xyz... done error: Unknown model: nonexistent-model-xyz "); }