Skip to content

Commit f01f2b9

Browse files
committed
fix reporting of invalid table names
1 parent 89cbb86 commit f01f2b9

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

atest/robot/parsing/table_names.robot

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,6 @@ Validate Invalid Table Error
5151
${path} = Normalize Path ${DATADIR}/parsing/${file}
5252
${message} = Catenate
5353
... Error in file '${path}': Unrecognized section header '${header}'.
54-
... Available headers: 'Setting(s)', 'Variable(s)', 'Test Case(s)',
54+
... Available headers for data: 'Setting(s)', 'Variable(s)', 'Test Case(s)',
5555
... 'Task(s)' and 'Keyword(s)'. Use 'Comment(s)' to embedded additional data.
5656
Check Log Message ${error} ${message} ERROR

src/robot/parsing/lexer/lexers.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -148,10 +148,10 @@ class ErrorSectionHeaderLexer(SectionHeaderLexer):
148148
def lex(self, ctx):
149149
self.statement[0].type = Token.ERROR
150150
self.statement[0].error = (
151-
"Unrecognized table header '%s'. Available headers for data: "
151+
"Unrecognized section header '%s'. Available headers for data: "
152152
"'Setting(s)', 'Variable(s)', 'Test Case(s)', 'Task(s)' and "
153153
"'Keyword(s)'. Use 'Comment(s)' to embedded additional data."
154-
% self.statement[0].value.strip('*').strip()
154+
% self.statement[0].value.strip('* ').strip()
155155
)
156156
for token in self.statement[1:]:
157157
token.type = Token.COMMENT

0 commit comments

Comments
 (0)