The repo was committed from WSL with core.filemode=false, so the exec bit was never recorded. After actions/checkout the entry script comes down as 100644 and tests/test_cli.sh fails with Permission denied. Set mode 100755 on every script that is invoked directly (entry, installer, test suite, mock binaries). Sourced helpers under lib/ keep 100644 per convention. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
16 lines
705 B
Bash
Executable File
16 lines
705 B
Bash
Executable File
#!/usr/bin/env bash
|
|
set -euo pipefail
|
|
|
|
ROOT_DIR=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")/.." && pwd)
|
|
# shellcheck source=tests/lib/assert.sh
|
|
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'
|
|
|
|
pass 'test_cli.sh'
|