add test for inline_font_files()
This commit is contained in:
parent
bced277049
commit
d644e54a38
1
test/fixtures/fonts/bgrove.base64.txt
vendored
Normal file
1
test/fixtures/fonts/bgrove.base64.txt
vendored
Normal file
File diff suppressed because one or more lines are too long
BIN
test/fixtures/fonts/bgrove.ttf
vendored
Executable file
BIN
test/fixtures/fonts/bgrove.ttf
vendored
Executable file
Binary file not shown.
@ -112,6 +112,12 @@ class SassExtensionsTest < Test::Unit::TestCase
|
||||
}
|
||||
end
|
||||
|
||||
def test_inline_font_files
|
||||
Compass.configuration.fonts_path = File.expand_path "../fixtures/fonts", File.dirname(__FILE__)
|
||||
base64_string = File.read(File.join(Compass.configuration.fonts_path, "bgrove.base64.txt")).chomp
|
||||
assert_equal "url('data:font/truetype;base64,#{base64_string}') format('truetype')", evaluate("inline_font_files('bgrove.ttf', truetype)")
|
||||
end
|
||||
|
||||
protected
|
||||
def evaluate(value)
|
||||
Sass::Script::Parser.parse(value, 0, 0).perform(Sass::Environment.new).to_s
|
||||
|
Loading…
Reference in New Issue
Block a user