1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
//! Shared helpers for integration tests.
//!
//! Every test module declares `mod common;` at the top to pull these in.
// Not every test uses every helper.
use Command;
/// Construct a `Command` pointing at the built `grex` binary.
/// The canonical list of CLI verbs. Keep in lockstep with `cli::args::Verb`.
/// Used by tests that need to enumerate every verb (e.g. help-output checks).
pub const VERBS: & = &;
/// Verbs whose stub still exits 0 with "unimplemented" stdout when invoked.
///
/// `serve` is excluded as of feat-m7-1 stage 8: it is now a real long-running
/// stdio MCP loop (no "unimplemented" message, exits non-zero on closed
/// stdin without a handshake). Its dedicated coverage lives in
/// `crates/grex/tests/serve_smoke.rs`. `doctor` is excluded as of feat-m7-4b:
/// it now executes real checks against the current working directory and
/// exits with a severity-derived code, so its dedicated coverage lives in
/// `crates/grex/tests/doctor_cli.rs`. `sync` is excluded as of
/// feat-m8-release: the bare-invocation fall-through now emits a
/// `usage` error envelope and exits 2 (see `man/reference/cli-json.md`
/// §"Missing `<pack_root>`"); its dedicated coverage lives in
/// `crates/grex/tests/json_output.rs::sync_without_pack_root_json_emits_usage_error`
/// and the E2E suite. Use this slice for parametric tests that actually
/// *run* the verb; use `VERBS` for tests that only inspect help text or
/// the verb-name surface.
pub const STUB_VERBS: & = &;
/// Return the minimal required positional args for a verb.
/// Verbs with no required positionals return an empty vec.
/// Run a verb with the given universal-flag slice and assert success +
/// "unimplemented" stub output. Flags are passed through verbatim so callers
/// can shape them (e.g. `&["--json", "--dry-run"]`).