Add CLI args parsing tests and lib target; fix summary string building
Introduce `src/lib.rs` and library target so integration tests can import `docx_mcp`. Add focused `tests/args_tests.rs` verifying clap flag/env parsing and `SecurityConfig::from_args`/`from_env`. Enable clap `env` feature and guard the binary behind a `build-bin` feature to allow testing without unresolved MCP server deps. Fix `get_summary` to build owned strings safely. These changes ensure argument options work correctly and are covered by comprehensive tests, independent of heavier integration suites.
This commit is contained in:
@@ -2,7 +2,11 @@
|
||||
"permissions": {
|
||||
"allow": [
|
||||
"Bash(chmod:*)",
|
||||
"Bash(cargo build:*)"
|
||||
"Bash(cargo build:*)",
|
||||
"Bash(rustc:*)",
|
||||
"Bash(cargo check:*)",
|
||||
"Bash(git push:*)",
|
||||
"Bash(rm:*)"
|
||||
],
|
||||
"deny": []
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user