Files
luk/shell/run_tests.sh
2025-07-15 22:13:46 -04:00

41 lines
929 B
Bash
Executable File

#!/bin/bash
# Test runner for run_himalaya.sh
echo "===================="
echo "Himalaya Script Test Suite"
echo "===================="
echo
# Check if glow is available (needed for message display)
if ! command -v glow >/dev/null 2>&1; then
echo "Warning: glow not found. Some tests may behave differently."
echo "Install with: brew install glow"
echo
fi
# Get the script directory
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
cd "$SCRIPT_DIR"
# Set up PATH to include our test mocks
export PATH="$SCRIPT_DIR/tests:$PATH"
# Run unit tests
echo "=== Unit Tests ==="
if ! bash "$SCRIPT_DIR/tests/unit_tests.sh"; then
echo "Unit tests failed!"
exit 1
fi
echo
echo "=== Integration Tests ==="
if ! bash "$SCRIPT_DIR/tests/integration_tests.sh"; then
echo "Integration tests failed!"
exit 1
fi
echo
echo "===================="
echo "All tests passed! ✅"
echo "===================="