Files
storybook/tests/compiler_errors/run_examples.sh

27 lines
1.7 KiB
Bash
Raw Normal View History

#!/bin/bash
# Script to run all compiler error examples and see the error messages
cd "$(dirname "$0")/../.."
echo "════════════════════════════════════════════════════════════════"
echo "STORYBOOK COMPILER ERRORS - EXAMPLES"
echo "════════════════════════════════════════════════════════════════"
echo ""
for file in tests/compiler_errors/*.sb; do
if [ -f "$file" ]; then
echo "═══════════════════════════════════════════════════════════════════"
echo "File: $(basename "$file")"
echo "═══════════════════════════════════════════════════════════════════"
cat "$file" | head -3 | tail -2 # Show the comment lines
echo ""
cargo run --quiet --bin sb -- validate "$file" 2>&1 || true
echo ""
echo ""
fi
done
echo "════════════════════════════════════════════════════════════════"
echo "ALL EXAMPLES COMPLETE"
echo "════════════════════════════════════════════════════════════════"