* [error] Add 'bail' and 'ensure' macros
* [error] Export 'bail' and 'ensure' from the right module
* [error] Document macro exporting trick
* [error] Adjust semicolons in bail macros
* introduce and Env trait to mock the outside world
* make argument parsing unit-testable
* add get_stderr to FakeEnv
* fakecmd and print errors into the env
* change ExitCode::from to into
Co-authored-by: Ximon Eighteen <3304436+ximon18@users.noreply.github.com>
* update some comments
* cargo fmt
* document some more of the testing utilities
* use exit_code method on clap errors
* bump minimal clap version
* reexport RealEnv
* remove .lock() calls for stdout and stderr
* remove args field from FakeCmd
* improve docs for Env
* cargo fmt
* use mutex in FakeStream
* improve FmtWriter implementation for a tiny bit more performance
* car go ffffffmmmmmmtttttt
---------
Co-authored-by: Ximon Eighteen <3304436+ximon18@users.noreply.github.com>
* Separate ldns parsing from clap parsing
Co-authored-by: Jannik Peters <jannik@nlnetlabs.nl>
* nsec3-hash: sort ldns argument parsing alphabetically
* abort ldns parsing early on malfored argv[0]
* add 'Error' prefix to ldns parsing errors
* use clap default exit code of 2 for dnst versions of commands
* remove args_overide_self from nsec3hash
* move parse_os and parse_os_with out of LdnsCommand
---------
Co-authored-by: Jannik Peters <jannik@nlnetlabs.nl>