()
| 28 | |
| 29 | #[test] |
| 30 | fn visible_subcommands_accept_clap_help() { |
| 31 | let command = Cli::command(); |
| 32 | for path in visible_subcommand_paths(&command) { |
| 33 | if path == ["tool"] { |
| 34 | continue; |
| 35 | } |
| 36 | |
| 37 | let args = std::iter::once("tracedecay".to_string()) |
| 38 | .chain(path.iter().cloned()) |
| 39 | .chain(std::iter::once("--help".to_string())); |
| 40 | let err = match Cli::try_parse_from(args) { |
| 41 | Ok(_) => panic!( |
| 42 | "`tracedecay {} --help` should short-circuit parsing", |
| 43 | path.join(" ") |
| 44 | ), |
| 45 | Err(err) => err, |
| 46 | }; |
| 47 | assert_eq!( |
| 48 | err.kind(), |
| 49 | ErrorKind::DisplayHelp, |
| 50 | "`tracedecay {} --help` should display help", |
| 51 | path.join(" ") |
| 52 | ); |
| 53 | } |
| 54 | } |
| 55 | |
| 56 | #[test] |
| 57 | fn every_visible_top_level_subcommand_ships_rich_help() { |
nothing calls this directly
no test coverage detected