Files
research-workbench/tests/test_bundle_md.sh
T

60 lines
1.8 KiB
Bash
Executable File

#!/bin/bash
# test_bundle_md.sh - Verify bundle/bundle.md thin root bundle (task-1)
# RED: Run before file is created (should fail)
# GREEN: Run after file is created (should pass)
REPO=/home/ken/workspace/research-workbench
BUNDLE_MD="$REPO/bundle/bundle.md"
PASS=0
FAIL=0
check_file_exists() {
if [ -f "$BUNDLE_MD" ]; then
echo "PASS: 'bundle/bundle.md' exists"
((PASS++))
else
echo "FAIL: 'bundle/bundle.md' should exist but is missing"
((FAIL++))
fi
}
check_contains() {
local description="$1"
local pattern="$2"
if grep -qF "$pattern" "$BUNDLE_MD" 2>/dev/null; then
echo "PASS: bundle.md contains '$description'"
((PASS++))
else
echo "FAIL: bundle.md is missing '$description'"
((FAIL++))
fi
}
echo "=== Checking bundle/bundle.md exists ==="
check_file_exists
echo ""
echo "=== Checking YAML frontmatter fields ==="
check_contains "bundle name: research-workbench" "name: research-workbench"
check_contains "bundle version: 0.1.0" "version: 0.1.0"
check_contains "bundle description" "description: General-purpose AI research tool with browser control and artifact generation"
echo ""
echo "=== Checking includes ==="
check_contains "foundation git+https URL" "git+https://github.com/microsoft/amplifier-foundation@main"
check_contains "research-workbench behavior include" "research-workbench:behaviors/research-workbench"
echo ""
echo "=== Checking body content ==="
check_contains "tool-bash reference" "tool-bash"
check_contains "tool-filesystem reference" "tool-filesystem"
check_contains "tool-web-fetch reference" "tool-web-fetch"
check_contains "researcher agent reference" "researcher"
echo ""
echo "=============================="
echo "Results: $PASS passed, $FAIL failed"
echo "=============================="
[ $FAIL -eq 0 ] && exit 0 || exit 1