From f378c0dc69d6b512ba679e334659c103b4102a9b 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 | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/sass_spec/test.rb b/lib/sass_spec/test.rb index 854f288215..c862dce644 100644 --- a/lib/sass_spec/test.rb +++ b/lib/sass_spec/test.rb @@ -612,7 +612,7 @@ def _extract_error_message(error, options) break end if (line =~ /DEPRECATION WARNING/) - if line.rstrip.end_with?(":") + if _is_multiple_line_error_message(line) error_message = line.rstrip + "\n" consume_next_line = true next @@ -629,6 +629,11 @@ def _extract_error_message(error, options) _clean_debug_path(error_message.rstrip, options[:spec_directory]) end +def _is_multiple_line_error_message(line) + line.rstrip.end_with?(":") || + line.rstrip.end_with?("Instead of being parsed as") +end + def _clean_debug_path(error, spec_dir) spec_dir = File.expand_path(spec_dir) url = spec_dir.gsub(/\\/, '\/')