Sync CLI help and README
This commit is contained in:
@@ -78,6 +78,7 @@ sudo ./iptables-forward.sh --batch add <proto> <listen_port> <target_ip> <target
|
||||
sudo ./iptables-forward.sh --batch delete <uuid>
|
||||
sudo ./iptables-forward.sh --batch list
|
||||
sudo ./iptables-forward.sh --batch save
|
||||
sudo ./iptables-forward.sh --batch env
|
||||
```
|
||||
|
||||
参数说明:
|
||||
@@ -141,6 +142,7 @@ tests/run_all.sh --skip-integration
|
||||
|
||||
测试覆盖:
|
||||
|
||||
- `tests/test_cli.sh`:入口脚本与安装脚本帮助输出
|
||||
- `tests/test_common.sh`:输入校验
|
||||
- `tests/test_storage.sh`:规则存储
|
||||
- `tests/test_env_check.sh`:环境检查与修复
|
||||
|
||||
@@ -36,6 +36,7 @@ usage() {
|
||||
./iptables-forward.sh --batch delete <uuid>
|
||||
./iptables-forward.sh --batch list
|
||||
./iptables-forward.sh --batch save
|
||||
./iptables-forward.sh --batch env
|
||||
./iptables-forward.sh --help
|
||||
|
||||
说明:
|
||||
|
||||
@@ -7,6 +7,7 @@ source "${ROOT_DIR}/tests/lib/assert.sh"
|
||||
|
||||
help_output=$("${ROOT_DIR}/iptables-forward.sh" --help)
|
||||
assert_contains "${help_output}" '--batch add <proto> <listen_port> <target_ip> <target_port> <ipver> [desc]' 'main script help should describe batch add'
|
||||
assert_contains "${help_output}" './iptables-forward.sh --batch env' 'main script help should describe batch env'
|
||||
|
||||
install_help=$("${ROOT_DIR}/install.sh" --help)
|
||||
assert_contains "${install_help}" '仅创建符号链接,不复制源码。' 'install help should explain symlink behavior'
|
||||
|
||||
Reference in New Issue
Block a user