Skip to content

Commit 6a11df8

Browse files
committed
Always compare outputs in UTF-8 mode
1 parent d0599ce commit 6a11df8

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/sass_spec/util.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ class << self
33
# Normalizes the whitespace in the given CSS to make it easier to compare
44
# across implementations.
55
def normalize_output(css)
6-
css.gsub(/(?:\r?\n)+/, "\n")
6+
css.gsub(/(?:\r?\n)+/, "\n").force_encoding("utf-8")
77
end
88

99
# Normalizes the path names and whitespace in the given error message.
@@ -16,6 +16,7 @@ def normalize_error(error)
1616
.sub(/(?:\r?\n)*\z/, "\n") # make sure we have exactly one trailing linefeed
1717
.sub(/\A(?:\r?\s)+\z/, "") # clear the whole file if only whitespace
1818
.gsub(/\r\n/, "\n") # remove Windows line feeds
19+
.force_encoding("utf-8")
1920
end
2021

2122
# Yields each directory in `path`, from the outermost to the innermost.

0 commit comments

Comments
 (0)