test.sh 724 B

12345678910111213141516171819202122232425262728293031
  1. #!/bin/bash
  2. # Test script for Lumacs
  3. set -e
  4. echo "Running Lumacs tests..."
  5. # Build first if needed
  6. if [ ! -f "build/lumacs" ]; then
  7. echo "Binary not found, building first..."
  8. ./scripts/build.sh
  9. fi
  10. # Run unit tests if they exist
  11. if [ -f "build/test_lumacs" ]; then
  12. echo "Running unit tests..."
  13. ./build/test_lumacs
  14. else
  15. echo "No unit tests found (build/test_lumacs)"
  16. fi
  17. # Test basic functionality
  18. echo "Testing basic functionality..."
  19. # Test with example file
  20. if [ -f "examples/test_dracula_simple.cpp" ]; then
  21. echo "Testing with example C++ file..."
  22. timeout 3s ./build/lumacs examples/test_dracula_simple.cpp || echo "Editor test completed (timeout expected)"
  23. fi
  24. echo "✓ Tests completed!"