Skip to content

Question about parser test octothorpe_in_property & escaped_octothorpe_in_property #24

@rakus

Description

@rakus

I'm confused by the two tests named in the title.

octothorpe_in_property
The test is defined in CMakeLists.txt (link) like this:

# test octothorpe at end of property value are included in value
new_ec_test(octothorpe_in_property comments.in test11.c
    "^key=value; not comment[ \t\n\r]*$")

The matching editorconfig properties in comments.in (link) is:

# Semicolon at end of value read as part of value
[test11.c]
key=value# not comment

escaped_octothorpe_in_property
The test is defined in CMakeList.txt (link):

# test escaped octothorpes are included in property value
new_ec_test(escaped_octothorpe_in_property comments.in test12.c
    "^key=value ; not comment[ \t\n\r]*$")

The matching editorconfig properties in comments.in (link) is:

# Escaped semicolon in value
[test12.c]
key=value \# not comment

Question: In both tests, the regex in the assertion contains a semicolon, but the value contains a hash sign. Is this a bug or did I get this wrong?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions