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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220354 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Daniel Dunbar 2014-10-22 00:34:31 +00:00
parent 1b2e041962
commit ac1af12c28

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