Sha256: 52fa1374feb36ff00386868b3183513a66faceca9aa6944f4893f8f720efef52
Contents?: true
Size: 844 Bytes
Versions: 9
Compression:
Stored size: 844 Bytes
Contents
require 'spec_helper' RSpec.describe Prawn::SVG::CSS do describe "#parse_font_family_string" do it "correctly handles quotes and escaping" do tests = { "" => [], "font" => ["font"], "font name, other font" => ["font name", "other font"], "'font name', other font" => ["font name", "other font"], "'font, name', other font" => ["font, name", "other font"], '"font name", other font' => ["font name", "other font"], '"font, name", other font' => ["font, name", "other font"], 'weird \\" name' => ['weird " name'], 'weird\\, name' => ["weird, name"], ' stupid , spacing ' => ["stupid", "spacing"], } tests.each do |string, expected| expect(Prawn::SVG::CSS.parse_font_family_string(string)).to eq expected end end end end
Version data entries
9 entries across 9 versions & 1 rubygems