Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge branch 'stable' into next
  • Loading branch information
nex3 committed Jun 17, 2017
2 parents d7d4949 + e36b74e commit 9acb760
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 4 deletions.
8 changes: 7 additions & 1 deletion test/sass/engine_test.rb
Expand Up @@ -3447,7 +3447,13 @@ def test_trailing_commas_in_arglists
private

def assert_hash_has(hash, expected)
expected.each {|k, v| assert_equal(v, hash[k])}
expected.each do |k, v|
if v.nil?
assert_nil(hash[k])
else
assert_equal(v, hash[k])
end
end
end

def assert_renders_encoded(css, sass)
Expand Down
6 changes: 5 additions & 1 deletion test/sass/source_map_test.rb
Expand Up @@ -982,7 +982,11 @@ def assert_positions_equal(expected, actual, lines, message = nil)
def assert_ranges_equal(expected, actual, lines, prefix)
assert_positions_equal(expected.start_pos, actual.start_pos, lines, prefix + " start position")
assert_positions_equal(expected.end_pos, actual.end_pos, lines, prefix + " end position")
assert_equal(expected.file, actual.file)
if expected.file.nil?
assert_nil(actual.file)
else
assert_equal(expected.file, actual.file)
end
end

def assert_sourcemaps_equal(source, css, expected, actual)
Expand Down
12 changes: 10 additions & 2 deletions test/sass/util/multibyte_string_scanner_test.rb
Expand Up @@ -139,7 +139,15 @@ def test_unscan
def assert_scanner_state(pos, byte_pos, matched_size, byte_matched_size)
assert_equal pos, @scanner.pos, 'pos'
assert_equal byte_pos, @scanner.byte_pos, 'byte_pos'
assert_equal matched_size, @scanner.matched_size, 'matched_size'
assert_equal byte_matched_size, @scanner.byte_matched_size, 'byte_matched_size'
if matched_size.nil?
assert_nil @scanner.matched_size, 'matched_size'
else
assert_equal matched_size, @scanner.matched_size, 'matched_size'
end
if byte_matched_size.nil?
assert_nil @scanner.byte_matched_size, 'byte_matched_size'
else
assert_equal byte_matched_size, @scanner.byte_matched_size, 'byte_matched_size'
end
end
end

0 comments on commit 9acb760

Please sign in to comment.