Files
drharness/tests/test_skill_scanner.sh
darthrubik 72b5f644c4 Validation, Error Handling & Full Integration
- Remove fallback behavior for malformed SKILL.md files in skill_scanner.cpp
- Now harness crashes immediately on invalid YAML frontmatter
- Updated tests to use proper YAML frontmatter
- Added new test_skill_validation.sh to verify crash behavior
- Removed test that expected fallback for invalid frontmatter
2026-05-20 16:22:08 -05:00

34 lines
692 B
Bash

#!/bin/bash
# test_skill_scanner.sh - Verifies the -D flag correctly scans and prints skill paths
# Create test skill directories
mkdir -p skills
mkdir -p .skills
cat > skills/SKILL.md << 'SKILL'
---
name: local-skill-1
---
# Local Skill 1
SKILL
cat > .skills/SKILL.md << 'SKILL'
---
name: local-skill-2
---
# Local Skill 2
SKILL
# Run drharness with -D flag
OUTPUT=$("${DRHARNESS}" -D -F dummy.chat)
# Verify output contains the expected paths
if ! echo "$OUTPUT" | grep -q "skills/SKILL.md"; then
echo "FAIL: Expected skills/SKILL.md in output"
exit 1
fi
if ! echo "$OUTPUT" | grep -q ".skills/SKILL.md"; then
echo "FAIL: Expected .skills/SKILL.md in output"
exit 1
fi