From 85a1de87613b6678de89ce81c346cab00312b8eb Mon Sep 17 00:00:00 2001 From: xzyfer Date: Mon, 26 Sep 2016 01:10:17 +1000 Subject: [PATCH] Handle multiple line CSS variable deprecation warning --- lib/sass_spec/test.rb | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/lib/sass_spec/test.rb b/lib/sass_spec/test.rb index 854f288215..32cb6dc243 100644 --- a/lib/sass_spec/test.rb +++ b/lib/sass_spec/test.rb @@ -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