import signal_parser

tests = {
    "TIPE 1 (Standar)": """#XAUUSD
Trade Details:📈#SELL
Entry Point: 4515
Stop Loss (SL): 4523
Take Profit 1 (TP1): 4512
Take Profit 2 (TP2): 4507""",

    "TIPE 2 (Range Entry)": """Buy Gold 4567 - 4572
Sl : 4557
Tp : 4577
Tp : 4587""",

    "TIPE 3 (Simple)": """XAUUSD SELL 4673
TP 4668
TP 4663
SL 4683""",

    "TIPE 4 (Emoji & Dash)": """#XAUUSD BUY @4600/4605
SL 4590
TP 4610""",

    "TIPE 5 (Equal Sign)": """SELL GOLD 4500
Stoploss = 4490
Takeprofit1 = 4510
Takeprofit2 = 4520""",

    "TIPE 6 (Quick NOW)": """XAUUSD SELL NOW 4673
Set TP1 +30 Pips"""
}

all_passed = True
for name, msg in tests.items():
    print(f"=== Testing {name} ===")
    sig = signal_parser.parse_signal(msg)
    if sig:
        print(f"✅ PASSED!")
    else:
        print(f"❌ FAILED!")
        all_passed = False
    print("-" * 30)

if all_passed:
    print("\n✅✅✅ ALL 6 PARSERS WORKING PERFECTLY! ✅✅✅")
else:
    print("\n❌❌❌ SOME PARSERS FAILED! ❌❌❌")
