Skip to content

Syntax Tests with partial symbols not recognized #384

@keith-hall

Description

@keith-hall

PackageDev currently doesn't correctly recognize syntax test files with partial-symbols in the meta line as syntax test files.

# SYNTAX TEST partial-symbols "Dockerfile.sublime-syntax"

Subsequently, there are no completions when pressing Tab after a # in a file with this header.

I guess there is something wrong with this line:
https://github.com/SublimeText/PackageDev/blob/master/plugins/syntaxtest_dev.py#L35

indeed, executing this in the ST Python console shows None:

import re
syntax_test_header_regex = re.compile(
    r'^(?P<comment_start>\s*.+?)'
    r'\s+SYNTAX TEST\s+'
    r'(?P<test_mode>(?:partial-symbols|(?:reindent(?:-un(?:indented|changed))?)\s+)*)'
    r'"(?P<syntax_file>[^"]+)"'
    r'\s*(?P<comment_end>\S+)?$'
)
first_line = '# SYNTAX TEST partial-symbols "Dockerfile.sublime-syntax"'
print(syntax_test_header_regex.match(first_line))

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions