#!/usr/bin/env python
# -*- coding: utf-8 -*-

line = "  0:00 InitGame: \g_matchmode\1\g_gametype\7\g_allowvote\536871039\g_gear\KQ\mapname\ut4_dust2_v2\gamename\q3urt43\g_survivor\0\auth\0\g_modversion\4.3.4"


def test_initgame():
    tmp = line.split()
    assert tmp[1] == "InitGame:"


def test_mod43():
    ret_val = 40
    if "g_modversion\4.3" in line:
        ret_val = 43
    assert ret_val == 43


def test_mod42():
    ret_val = 40
    if "g_modversion\4.2" in line:
        ret_val = 42
    assert ret_val == 40


def test_ffa_gametype():
    ret_val = None
    if "g_gametype\0" in line:
        ret_val = "FFA"
    assert ret_val != "FFA"


def test_ctf_gametype():
    ret_val = "FFA"
    if "g_gametype\7" in line:
        ret_val = "CTF"
    assert ret_val == "CTF"

@@ -769,16 +769,155 @@
 et_val == %22CTF%22%0A
+%0A%0Adef test_gear_value():%0A    gear = line.split('g_gear%5C%5C')%5B-1%5D.split('%5C%5C')%5B0%5D if 'g_gear%5C%5C' in line else %22%25s%22 %25 ''%0A    assert gear == %22KQ%22%0A

Add test to check gear value