49 lines
1.4 KiB
Python
49 lines
1.4 KiB
Python
#!/usr/bin/env python3
|
|
"""
|
|
Prueba de uso real del sistema corregido
|
|
"""
|
|
|
|
if __name__ == "__main__":
|
|
print("🎯 PRUEBA DE USO REAL")
|
|
print("=" * 40)
|
|
|
|
try:
|
|
from main_evaluation import HybridEvaluationEngine
|
|
|
|
# Crear motor sin debug para simular uso real
|
|
engine = HybridEvaluationEngine()
|
|
engine.debug = False
|
|
|
|
# Casos exactos del usuario
|
|
test_sequence = [
|
|
"mask=255.240.0.3",
|
|
"mask",
|
|
"ip=10.1.1.1",
|
|
"10.1.1.1",
|
|
"ip"
|
|
]
|
|
|
|
print("Secuencia de comandos del usuario:")
|
|
print("-" * 40)
|
|
|
|
for i, command in enumerate(test_sequence, 1):
|
|
print(f"\n{i}. {command}")
|
|
result = engine.evaluate_line(command)
|
|
|
|
if result.is_error:
|
|
print(f" ❌ Error: {result.error}")
|
|
else:
|
|
print(f" ✅ {result.result}")
|
|
if hasattr(result.result, '__class__'):
|
|
print(f" [{result.result.__class__.__name__}]")
|
|
|
|
print(f"\n" + "=" * 40)
|
|
print("ESTADO FINAL:")
|
|
print(f"Variables: {list(engine.symbol_table.keys())}")
|
|
for var, value in engine.symbol_table.items():
|
|
print(f" {var} = {value}")
|
|
|
|
except Exception as e:
|
|
print(f"Error: {e}")
|
|
import traceback
|
|
traceback.print_exc() |