#!/usr/bin/env bash set -u SCRIPT_DIR="$(cd "$(dirname "$0")/.." && pwd)" source "$SCRIPT_DIR/lib/common.sh" FAILURES=0 assert_eq() { local expected="$1" actual="$2" name="$3" if [ "$expected" = "$actual" ]; then echo "PASS: $name" else echo "FAIL: $name (expected '$expected', got '$actual')" FAILURES=$((FAILURES + 1)) fi } # Setup: temp consumer settings + brain fragment tmpdir=$(mktemp -d) cp "$SCRIPT_DIR/fixtures/sample-settings.json" "$tmpdir/settings.json" cat > "$tmpdir/fragment.json" <