def METHOD_NAME(lexer, text):
    """Test some valid rules of TNT."""
    assert lexer.rule(0, text) == len(text)
    assert lexer.cur[0][:2] == (0, Keyword)
    if text[-1].isdigit():
        assert lexer.cur[1][1] == Number.Integer