Skip to content

Commit e7616c1

Browse files
am11mgreter
authored andcommitted
runner: Uses ASCII-8BIT encoding for File.read.
Fixes: #714.
1 parent bf60606 commit e7616c1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/sass_spec/test_case.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ def output
9999
end
100100

101101
def expected
102-
output = File.read(@expected_path, :binmode => true)
102+
output = File.read(@expected_path, :binmode => true, :encoding => "ASCII-8BIT")
103103
# we seem to get CP850 otherwise
104104
# this provokes equal test to fail
105105
output.force_encoding('ASCII-8BIT')
@@ -111,7 +111,7 @@ def expected
111111
end
112112

113113
def expected_error
114-
@expected_error = _clean_error(File.read(@error_path, :binmode => true))
114+
@expected_error = _clean_error(File.read(@error_path, :binmode => true, :encoding => "ASCII-8BIT"))
115115
end
116116

117117
def expected_status

0 commit comments

Comments
 (0)