test.sh 629 B

123456789101112131415161718192021222324252627
  1. #!/usr/bin/env 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
  11. echo "Running unit tests with CTest..."
  12. ctest --test-dir build
  13. # Test basic functionality
  14. echo "Testing basic functionality..."
  15. # Test with example file
  16. if [ -f "examples/test_dracula_simple.cpp" ]; then
  17. echo "Testing with example C++ file..."
  18. timeout 3s ./build/lumacs examples/test_dracula_simple.cpp || echo "Editor test completed (timeout expected)"
  19. fi
  20. echo "✓ Tests completed!"