Skip to content

Commit

Permalink
Handle multiple line CSS variable deprecation warning
Browse files Browse the repository at this point in the history
  • Loading branch information
xzyfer committed Sep 25, 2016
1 parent 7a89f38 commit 85a1de8
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions lib/sass_spec/test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -605,17 +605,29 @@ def assert_filename_length!(filename, options)
def _extract_error_message(error, options)
error_message = ""
consume_next_line = false
multiline_error = false
error.each_line do |line|
if consume_next_line
next if line.strip == ""
error_message += line
break
end
if (multiline_error)
error_message += line.rstrip + "\n"
multiline_error = false
consume_next_line = false
break
end
if (line =~ /DEPRECATION WARNING/)
if line.rstrip.end_with?(":")
error_message = line.rstrip + "\n"
consume_next_line = true
next
elsif line.rstrip.end_with?("Instead of being parsed as")
multiline_error = true
error_message = line.rstrip + "\n"
consume_next_line = true
next
else
error_message = line
break
Expand Down

0 comments on commit 85a1de8

Please # to comment.