24 lines
534 B
Bash
24 lines
534 B
Bash
#!/usr/bin/env bash
|
|
set -euo pipefail
|
|
|
|
ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
|
cd "$ROOT_DIR"
|
|
|
|
OUT="$(mktemp)"
|
|
trap 'rm -f "$OUT"' EXIT
|
|
|
|
set +e
|
|
go test -tags llm_script ./scripts >"$OUT" 2>&1
|
|
RC=$?
|
|
set -e
|
|
|
|
if [[ "$RC" -eq 0 ]]; then
|
|
echo "expected go test -tags llm_script ./scripts to fail before conflict isolation"
|
|
exit 1
|
|
fi
|
|
|
|
grep -q 'main redeclared in this block' "$OUT"
|
|
grep -Eq 'ModelPricing redeclared in this block|logger redeclared in this block' "$OUT"
|
|
|
|
echo "scripts_conflict_detection_test: PASS"
|