Fix ShTest parsing error when a keyword line doesn't end with a newline.

llvm-svn: 220354
This commit is contained in:
Daniel Dunbar 2014-10-22 00:34:31 +00:00
parent 8226ca29e2
commit dfbb5c1b76
1 changed files with 4 additions and 0 deletions

View File

@ -343,6 +343,10 @@ def parseIntegratedTestScriptCommands(source_path):
# Read the entire file contents.
data = f.read()
# Ensure the data ends with a newline.
if not data.endswith('\n'):
data = data + '\n'
# Iterate over the matches.
line_number = 1
last_match_position = 0