[DRE-commits] [ruby-pygments.rb] 02/03: Drop unfeasible test

Antonio Terceiro terceiro at moszumanska.debian.org
Wed Feb 4 21:46:31 UTC 2015


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

terceiro pushed a commit to branch master
in repository ruby-pygments.rb.

commit 3a0251d8b751bc224e5d6dc1fd6ef058ad65ca91
Author: Antonio Terceiro <terceiro at debian.org>
Date:   Wed Feb 4 19:23:06 2015 -0200

    Drop unfeasible test
---
 debian/patches/0008-Drop-unfeasible-test.patch | 47 ++++++++++++++++++++++++++
 debian/patches/series                          |  1 +
 2 files changed, 48 insertions(+)

diff --git a/debian/patches/0008-Drop-unfeasible-test.patch b/debian/patches/0008-Drop-unfeasible-test.patch
new file mode 100644
index 0000000..cd25e2e
--- /dev/null
+++ b/debian/patches/0008-Drop-unfeasible-test.patch
@@ -0,0 +1,47 @@
+Description: Drop unfeasible test
+ That code works on the original upstream source, which embeds a slightly
+ modified version of pygments, but won't work with the version of pygments in
+ debian.
+ .
+ With Debian pygments:
+ .
+ $ python
+ Python 2.7.9 (default, Dec 11 2014, 08:58:12) 
+ [GCC 4.9.2] on linux2
+ Type "help", "copyright", "credits" or "license" for more information.
+ >>> from pygments import lexers
+ >>> lexers.guess_lexer('a')
+ Traceback (most recent call last):
+   File "<stdin>", line 1, in <module>
+   File "/usr/lib/python2.7/dist-packages/pygments/lexers/__init__.py", line 252, in guess_lexer
+     raise ClassNotFound('no lexer matching the text found')
+ pygments.util.ClassNotFound: no lexer matching the text found
+ .
+ With upstream embeded pygments:
+ .
+ $ python
+ Python 2.7.9 (default, Dec 11 2014, 08:58:12) 
+ [GCC 4.9.2] on linux2
+ Type "help", "copyright", "credits" or "license" for more information.
+ >>> from pygments import lexers
+ >>> lexers.guess_lexer('a')
+ <pygments.lexers.QBasicLexer>
+Author: Antonio Terceiro
+Origin: vendor
+Forwarded: not-needed
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+--- a/test/test_pygments.rb
++++ b/test/test_pygments.rb
+@@ -87,11 +87,6 @@ class PygmentsHighlightTest < Test::Unit
+     assert_match '<title>test</title>', code
+   end
+ 
+-  def test_highlight_works_with_single_character_input
+-    code = P.highlight("a")
+-    assert_match 'a</span>', code
+-  end
+-
+   def test_highlight_works_with_trailing_newline
+     code = P.highlight(RUBY_CODE_TRAILING_NEWLINE)
+     assert_match '<span class="c1">#!/usr/bin/ruby</span>', code
diff --git a/debian/patches/series b/debian/patches/series
index d2a5edd..4b97d9a 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -5,3 +5,4 @@
 0005-Use-proper-python-shebang.patch
 0006-Invoke-mentos-directly-on-GNU-Linux.patch
 0007-Update-test-result.patch
+0008-Drop-unfeasible-test.patch

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



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