mirror of
https://github.com/jekyll/jekyll.git
synced 2026-02-05 12:15:26 -05:00
Compliant with Ruby 2.0.0
This commit is contained in:
@@ -25,7 +25,7 @@ class TestConvertible < Test::Unit::TestCase
|
||||
ret = @convertible.read_yaml(@base, name)
|
||||
assert_equal({}, ret)
|
||||
end
|
||||
assert_match(/YAML Exception|syntax error/, out)
|
||||
assert_match(/YAML Exception|syntax error|Error reading file/, out)
|
||||
assert_match(/#{File.join(@base, name)}/, out)
|
||||
end
|
||||
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# encoding: UTF-8
|
||||
|
||||
require 'helper'
|
||||
|
||||
class TestKramdown < Test::Unit::TestCase
|
||||
@@ -23,11 +25,11 @@ class TestKramdown < Test::Unit::TestCase
|
||||
|
||||
should "convert quotes to smart quotes" do
|
||||
markdown = Converters::Markdown.new(@config)
|
||||
assert_equal "<p>“Pit’hy”</p>", markdown.convert(%{"Pit'hy"}).strip
|
||||
assert_match /<p>(“|“)Pit(’|’)hy(”|”)<\/p>/, markdown.convert(%{"Pit'hy"}).strip
|
||||
|
||||
override = { 'kramdown' => { 'smart_quotes' => 'lsaquo,rsaquo,laquo,raquo' } }
|
||||
markdown = Converters::Markdown.new(@config.deep_merge(override))
|
||||
assert_equal "<p>«Pit›hy»</p>", markdown.convert(%{"Pit'hy"}).strip
|
||||
assert_match /<p>(«|«)Pit(›|›)hy(»|»)<\/p>/, markdown.convert(%{"Pit'hy"}).strip
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user