Split trycmd into per-subcommand tests and remove live-probe doctor fixtures

Split the single cli_tests trycmd function into 14 per-subcommand test
functions so nextest can parallelize them. Delete header.toml and
verbose.toml doctor fixtures that ran live network probes — the existing
dry-run-flag.toml and help.trycmd already cover the same output assertion.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Bryan Helmkamp 2026-03-13 18:03:23 -04:00
parent cb21dc8096
commit 858bdc3788
5 changed files with 24 additions and 21 deletions

View file

@ -1,3 +0,0 @@
...
[..]Fabro Doctor[..]
...

View file

@ -1,5 +0,0 @@
bin.name = "fabro"
args = ["doctor"]
[env]
inherit = false

View file

@ -1,3 +0,0 @@
...
[..]Fabro Doctor[..]
...

View file

@ -1,5 +0,0 @@
bin.name = "fabro"
args = ["doctor", "-v"]
[env]
inherit = false

View file

@ -1,6 +1,25 @@
#[test]
fn cli_tests() {
trycmd::TestCases::new()
.case("tests/cmd/**/*.trycmd")
.case("tests/cmd/**/*.toml");
macro_rules! trycmd_subcommand {
($name:ident, $dir:expr) => {
#[test]
fn $name() {
trycmd::TestCases::new()
.case(concat!("tests/cmd/", $dir, "/*.trycmd"))
.case(concat!("tests/cmd/", $dir, "/*.toml"));
}
};
}
trycmd_subcommand!(cli_cp, "cp");
trycmd_subcommand!(cli_doctor, "doctor");
trycmd_subcommand!(cli_exec, "exec");
trycmd_subcommand!(cli_init, "init");
trycmd_subcommand!(cli_install, "install");
trycmd_subcommand!(cli_llm, "llm");
trycmd_subcommand!(cli_model, "model");
trycmd_subcommand!(cli_pr, "pr");
trycmd_subcommand!(cli_preview, "preview");
trycmd_subcommand!(cli_run, "run");
trycmd_subcommand!(cli_ssh, "ssh");
trycmd_subcommand!(cli_system, "system");
trycmd_subcommand!(cli_top_level, "top-level");
trycmd_subcommand!(cli_validate, "validate");