test: prove the documented examples against the binary (#15)
* test: prove the documented examples against the binary The README, the website and the shipped SKILL.md all promise specific records, keys and exit codes, and nothing was checking that the binary still agrees. Cover the claims that were unverified: the eleven credential-free commands, the one-day bound on every wait, the config directory relocation, `serve` refusing to run without a listener, the four action commands that answer with an exit code alone, the search filters, `--password-stdin`, `room listen`'s join records, and every `--json` field the docs name for search, browse, whoami, user, shares, room, download, serve and portmap. The library README's examples now compile as doctests: lib.rs includes it as the crate docs and the fences are `no_run`, so a signature change cannot leave the advertised usage stale. Two things were wrong. SKILL.md listed `queued` as a `serve` upload status, which `upload_record` never emits — an agent branching on it would wait for a state that never arrives. And the library README still pointed at the 7.x lib. * test: cover the completions commands the docs now advertise
This commit is contained in:
@@ -81,7 +81,7 @@ credentials and connection work.
|
||||
|
||||
**`serve`** — stay online sharing files, one object per upload change: `user`,
|
||||
`path`, `size`, `bytes_sent`, `speed`, `status`
|
||||
(`queued`/`uploading`/`completed`/`cancelled`/`failed`), `reason`.
|
||||
(`uploading`/`completed`/`cancelled`/`failed`), `reason`.
|
||||
|
||||
**`shares list`** — one object per configured folder: `directory`, `usable`.
|
||||
**`shares add <directory>`** and **`shares remove <directory>`** — change the
|
||||
|
||||
Reference in New Issue
Block a user