#!/bin/bash # Enhanced Terminal Test Script # This script verifies the application is built correctly echo "๐Ÿงช Testing Enhanced Terminal..." echo "" # Check if app exists if [ ! -d "EnhancedTerminal.app" ]; then echo "โŒ EnhancedTerminal.app not found!" echo " Run ./build.sh first" exit 1 fi echo "โœ… Application bundle exists" # Check if executable exists if [ ! -f "EnhancedTerminal.app/Contents/MacOS/EnhancedTerminal" ]; then echo "โŒ Executable not found!" exit 1 fi echo "โœ… Executable exists" # Check if executable is executable if [ ! -x "EnhancedTerminal.app/Contents/MacOS/EnhancedTerminal" ]; then echo "โŒ Executable is not executable!" exit 1 fi echo "โœ… Executable has correct permissions" # Check if Info.plist exists if [ ! -f "EnhancedTerminal.app/Contents/Info.plist" ]; then echo "โŒ Info.plist not found!" exit 1 fi echo "โœ… Info.plist exists" # Check file size SIZE=$(stat -f%z "EnhancedTerminal.app/Contents/MacOS/EnhancedTerminal" 2>/dev/null || stat -c%s "EnhancedTerminal.app/Contents/MacOS/EnhancedTerminal" 2>/dev/null) if [ "$SIZE" -lt 100000 ]; then echo "โš ๏ธ Warning: Executable seems small ($SIZE bytes)" else echo "โœ… Executable size looks good ($SIZE bytes)" fi # Check if all source files exist echo "" echo "๐Ÿ“ Checking source files..." FILES=( "EnhancedTerminalApp.swift" "Settings.swift" "HistoryManager.swift" "SnippetManager.swift" "AIManager.swift" "TerminalSession.swift" "Panels.swift" "MainWindowController.swift" ) for file in "${FILES[@]}"; do if [ -f "$file" ]; then echo " โœ… $file" else echo " โŒ $file missing!" fi done # Check documentation echo "" echo "๐Ÿ“š Checking documentation..." DOCS=( "README.md" "USAGE_GUIDE.md" "QUICK_REFERENCE.md" "CHANGES.md" "IMPLEMENTATION_SUMMARY.md" ) for doc in "${DOCS[@]}"; do if [ -f "$doc" ]; then echo " โœ… $doc" else echo " โŒ $doc missing!" fi done echo "" echo "โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”" echo "โœ… All tests passed!" echo "" echo "To run the application:" echo " open EnhancedTerminal.app" echo "" echo "Or double-click EnhancedTerminal.app in Finder" echo "โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”"