diff --git a/gollum.gemspec b/gollum.gemspec index 170d9edb..f773abfe 100644 --- a/gollum.gemspec +++ b/gollum.gemspec @@ -10,10 +10,10 @@ Gem::Specification.new do |s| s.rubyforge_project = 'gollum' s.license = 'MIT' - s.summary = "A simple, Git-powered wiki." - s.description = "A simple, Git-powered wiki with a sweet API and local frontend." + s.summary = 'A simple, Git-powered wiki.' + s.description = 'A simple, Git-powered wiki with a sweet API and local frontend.' - s.authors = ["Tom Preston-Werner", "Rick Olson"] + s.authors = ['Tom Preston-Werner', 'Rick Olson'] s.email = 'tom@github.com' s.homepage = 'http://github.com/gollum/gollum' @@ -33,6 +33,7 @@ Gem::Specification.new do |s| s.add_development_dependency 'rack-test', '~> 0.6.2' s.add_development_dependency 'shoulda', '~> 3.4.0' s.add_development_dependency 'minitest-reporters', '~> 0.14.16' + s.add_development_dependency 'twitter_cldr', '~> 2.4.2' # = MANIFEST = s.files = %w[ diff --git a/test/helper.rb b/test/helper.rb index db5841ff..65fc79aa 100644 --- a/test/helper.rb +++ b/test/helper.rb @@ -5,6 +5,7 @@ require 'shoulda' require 'mocha/setup' require 'fileutils' require 'minitest/reporters' +require 'twitter_cldr' # Silence locale validation warning require 'i18n' diff --git a/test/test_app.rb b/test/test_app.rb index 2e2de80c..bfbc0aa3 100644 --- a/test/test_app.rb +++ b/test/test_app.rb @@ -63,9 +63,13 @@ context "Frontend" do assert_match /
one\ntwo\nthree\nfour\n<\/code><\/pre>\n/m, last_response.body
   end
 
+  def nfd utf8
+    TwitterCldr::Normalization::NFD.normalize utf8
+  end
+
   test "UTF-8 headers href preserved" do
     page = 'utfh1'
-    text = '한글'
+    text = nfd('한글')
 
     # don't use h1 or it will be promoted to replace file name
     # which doesn't generate a normal header link
@@ -74,7 +78,10 @@ context "Frontend" do
 
     get page
 
-    assert_match /

#{text}<\/a><\/h2>/, last_response.body + expected = "

#{text}

" + actual = nfd(last_response.body) + + assert_match /#{expected}/, actual end test "retain edit information" do