Skip to content

Commit

Permalink
Fix ShTest parsing error when a keyword line doesn't end with a newline.
Browse files Browse the repository at this point in the history
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220354 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
ddunbar committed Oct 22, 2014
1 parent 1b2e041 commit ac1af12
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions utils/lit/lit/TestRunner.py
Original file line number Diff line number Diff line change
Expand Up @@ -343,6 +343,10 @@ def to_string(bytes):
# 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
Expand Down

0 comments on commit ac1af12

Please sign in to comment.