def test_parse_defines_handles_multiple_input_lines():
    p = Preprocessor()

    multi_line_1 = """\
#define ID_WITH_UNDERSCORE something
#define ID2 somethingelse
"""
    assert p.parse_defines(multi_line_1) == {
        "ID_WITH_UNDERSCORE": "something",
        "ID2": "somethingelse"
    }
def test_parse_defines_does_not_understand_comments_by_current_design():
    # comments are not understood. lines are expected to already have comments removed!
    p = Preprocessor()

    multi_line_2 = """\
#define ID_WITH_UNDERSCORE something
/*
#define ID2 somethingelse
*/
"""
    assert "ID2" in p.parse_defines(multi_line_2)
def test_parse_defines_does_not_understand_line_continuations_with_backslash_by_current_design(
):
    p = Preprocessor()

    multi_line_3 = r"""
    #define ID_WITH_UNDERSCORE something \
           line2
    """

    assert p.parse_defines(multi_line_3) == {
        "ID_WITH_UNDERSCORE": "something \\"
    }