Sha256: 880a7b9fa382ed797ffaa51d7732bd49b22a4d908f508c11f92af339f0a12e0a
Contents?: true
Size: 917 Bytes
Versions: 5
Compression:
Stored size: 917 Bytes
Contents
require 'spec_helper' RSpec.describe Prawn::SVG::CSS::FontFamilyParser do describe '#parse' 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::FontFamilyParser.parse(string)).to eq expected end end end end
Version data entries
5 entries across 5 versions & 1 rubygems