Files
llm-intelligence/scripts/review/review_status_summary_test.sh
2026-05-29 18:48:48 +08:00

23 lines
793 B
Bash
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
#!/usr/bin/env bash
set -euo pipefail
ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)"
cd "$ROOT_DIR"
TMP_DIR="$(mktemp -d)"
trap 'rm -rf "$TMP_DIR"' EXIT
cat > "$TMP_DIR/git_status.txt" <<'EOF'
EOF
cat > "$TMP_DIR/backlog_rows.txt" <<'EOF'
| 8 | cron review 无 delta 时空转 | P1 | 05-08 09:12 | ❌ 未修复 | 13 次 |
| 9 | 验证模式伪进展artifact_present 局限) | P1 | 05-08 14:30 | ❌ 未修复 | 10 次 |
EOF
OUTPUT="$(bash scripts/review/review_status_summary.sh "$TMP_DIR/git_status.txt" "$TMP_DIR/backlog_rows.txt")"
printf '%s' "$OUTPUT" | grep -q 'REVIEW_STATUS no_delta=true'
printf '%s' "$OUTPUT" | grep -q 'dirty_worktree=0'
printf '%s' "$OUTPUT" | grep -q 'open_issues=2'
printf '%s' "$OUTPUT" | grep -q 'focus=risk_aging,unverified,backlog'