[DRE-commits] [ruby-albino] 01/06: adapt tests to deal with empty span blocks added by pygments (Closes: #824737)

Cédric Boutillier boutil at moszumanska.debian.org
Fri Jun 3 15:13:57 UTC 2016


This is an automated email from the git hooks/post-receive script.

boutil pushed a commit to branch master
in repository ruby-albino.

commit 0a18d4b480a60e09b8a7ff235174d2a3a1651483
Author: Cédric Boutillier <boutil at debian.org>
Date:   Fri Jun 3 15:37:55 2016 +0200

    adapt tests to deal with empty span blocks added by pygments (Closes: #824737)
---
 ...01_fix_Albino_Multi_accepting_UTF-8_input.patch | 19 ++++++-------
 .../002_fix-albino-according-pygments.patch        | 31 ++++++++++++++++++----
 2 files changed, 34 insertions(+), 16 deletions(-)

diff --git a/debian/patches/001_fix_Albino_Multi_accepting_UTF-8_input.patch b/debian/patches/001_fix_Albino_Multi_accepting_UTF-8_input.patch
index c8a29d3..ad0aa3c 100644
--- a/debian/patches/001_fix_Albino_Multi_accepting_UTF-8_input.patch
+++ b/debian/patches/001_fix_Albino_Multi_accepting_UTF-8_input.patch
@@ -2,15 +2,14 @@ From: Mislav Marohnic <mislav.marohnic at gmail.com>
 Origin: upstream, https://github.com/github-archive/albino/commit/ea72e6451ac48048c7e7e241bf9cfbbc666c778d.patch
 Reviewed-by: Sebastien Badia <seb at sebian.fr>
 Date: Sat, 8 Oct 2011 19:01:00 +0200
-Subject: [PATCH] fix Albino::Multi accepting UTF-8 input
+Subject: [PATCH] fix Albino::Multi accepting UTF-8 input (modified to deal with empty span blocks)
+Last-Update: 2016-06-03
 
 ---
  test/multi_albino_test.rb | 7 +++++++
  vendor/multipygmentize    | 1 +
  2 files changed, 8 insertions(+)
 
-diff --git a/test/multi_albino_test.rb b/test/multi_albino_test.rb
-index e53bc2c..43142cd 100644
 --- a/test/multi_albino_test.rb
 +++ b/test/multi_albino_test.rb
 @@ -1,3 +1,5 @@
@@ -19,27 +18,25 @@ index e53bc2c..43142cd 100644
  require 'rubygems'
  require 'albino/multi'
  require 'test/unit'
-@@ -27,6 +29,11 @@ def test_forces_utf8
+@@ -27,6 +29,11 @@
      end
    end
-
+ 
 +  def test_accepts_utf8
 +    code = Albino::Multi.colorize('éøü', :html)
-+    assert_includes code, "<pre>éøü\n</pre>"
++    assert_includes code, "éøü\n</pre>"
 +  end
 +
    def test_works_with_strings
      syntaxer = Albino::Multi.new("class New\nend", :ruby)
      assert_match %r(highlight), code=syntaxer.colorize
-diff --git a/vendor/multipygmentize b/vendor/multipygmentize
-index 8649f7d..467043f 100755
 --- a/vendor/multipygmentize
 +++ b/vendor/multipygmentize
 @@ -14,6 +14,7 @@
-
+ 
  import sys, os, codecs
-
+ 
 +sys.stdin = codecs.getreader('UTF-8')(sys.stdin)
  sys.stdout = codecs.getwriter('UTF-8')(sys.stdout)
-
+ 
  vpath = os.path.realpath(__file__).split("/")
diff --git a/debian/patches/002_fix-albino-according-pygments.patch b/debian/patches/002_fix-albino-according-pygments.patch
index 028edf0..20a55c1 100644
--- a/debian/patches/002_fix-albino-according-pygments.patch
+++ b/debian/patches/002_fix-albino-according-pygments.patch
@@ -1,17 +1,38 @@
 Description: Fix albino test accroding new pygments
 Author: Sebastien Badia <seb at sebian.fr>
 Bug-Debian: https://bugs.debian.org/813644
+Bug-Debian: https://bugs.debian.org/824737
 Forwarded: no
-Last-Update: 2016-03-29
+Last-Update: 2016-06-03
 
---- ruby-albino-1.3.3.orig/test/albino_test.rb
-+++ ruby-albino-1.3.3/test/albino_test.rb
-@@ -39,7 +39,7 @@ class AlbinoTest < Test::Unit::TestCase
+--- a/test/albino_test.rb
++++ b/test/albino_test.rb
+@@ -13,7 +13,7 @@
+ 
+   def test_defaults_to_text
+     syntaxer = Albino.new('abc')
+-    regex    = /span/
++    regex    = /span[^>]/
+     assert_no_match regex, syntaxer.colorize
+   end
+ 
+@@ -39,7 +39,7 @@
    def test_works_with_utf8_strings
      code = Albino.new("# é", :bash).colorize
      assert_match %r(highlight), code
 -    assert_match %(<span class="c"># é</span>), code
 +    assert_match %(<span class="c1"># é</span>), code
    end
-
+ 
    def test_works_with_files
+--- a/test/multi_albino_test.rb
++++ b/test/multi_albino_test.rb
+@@ -13,7 +13,7 @@
+ 
+   def test_defaults_to_text
+     syntaxer = Albino::Multi.new('abc')
+-    regex    = /span/
++    regex    = /span[^>]/
+     assert_no_match regex, syntaxer.colorize
+   end
+ 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ruby-extras/ruby-albino.git



More information about the Pkg-ruby-extras-commits mailing list