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
//! Property-based tests (design ยง7.3):
//! - the help-text flag extractor never panics and is deterministic on
//! arbitrary text.
//! - random markdown never panics the SKILL.md frontmatter parser.
//!
//! These exercise the library code directly (not the binary) so they're a
//! unit-test file under `tests/` that depends on the crate's exposed
//! functions โ which is why `extract_flags` and `parse_skill_frontmatter`
//! are `pub` in their modules.
use *;
// Flat module re-exports so the test can reach the crate internals. The crate
// is a binary (`[[bin]]`), so we pull items by path relative to the crate
// root via the `skillpack` crate name only when a `lib` target exists. Since
// this is a bin-only crate, the integration test cannot `use skillpack::...`
// directly. Instead we thin-link the modules by re-compiling the same source
// through a small shim is overkill โ so we assert behavior through the binary
// instead. Property tests below therefore drive `extract_flags`-like logic by
// running `skillpack verify` on generated inputs.
proptest!