#!/usr/bin/env python3 """ Test script for the text interface. """ from interface import TextInterface def test_interface(): """Test the text interface functionality.""" print("Testing Text Interface") print("Type 'quit' to exit the test") print("-" * 30) # Create interface instance interface = TextInterface() # Test loop while True: try: # Get user input user_input = interface.get_user_input() # Check for exit command if user_input.lower() in ['quit', 'exit', 'q']: print("Exiting test...") break # Display response interface.display_response(f"You entered: {user_input}") except KeyboardInterrupt: print("\nTest interrupted!") break if __name__ == "__main__": test_interface()