Hi,
this is a NMU debdiff that fixes this bug.  The problem is generally
caused by strong dependency on pygments - some testsuite tests may
fail when pygments formatting changes. I guess that they should be
more robust and pygment-version-independent, but well...

Tomasz
diff -Nru ruby-pygments.rb-0.5.4~ds1/debian/changelog ruby-pygments.rb-0.5.4~ds1/debian/changelog
--- ruby-pygments.rb-0.5.4~ds1/debian/changelog	2014-04-04 04:06:32.000000000 +0200
+++ ruby-pygments.rb-0.5.4~ds1/debian/changelog	2014-11-22 15:18:56.000000000 +0100
@@ -1,3 +1,10 @@
+ruby-pygments.rb (0.5.4~ds1-1.1) unstable; urgency=medium
+
+  * Non-maintainer upload.
+  * Update the testsuite (Closes: #768615)
+
+ -- Tomasz Buchert <tomasz.buch...@inria.fr>  Sat, 22 Nov 2014 15:18:14 +0100
+
 ruby-pygments.rb (0.5.4~ds1-1) unstable; urgency=low
 
   * Initial release (Closes: #703188)
diff -Nru ruby-pygments.rb-0.5.4~ds1/debian/patches/0007-Update-test-result.patch ruby-pygments.rb-0.5.4~ds1/debian/patches/0007-Update-test-result.patch
--- ruby-pygments.rb-0.5.4~ds1/debian/patches/0007-Update-test-result.patch	2014-04-04 03:54:49.000000000 +0200
+++ ruby-pygments.rb-0.5.4~ds1/debian/patches/0007-Update-test-result.patch	2014-11-22 15:17:56.000000000 +0100
@@ -1,18 +1,28 @@
 Description: Update test result
 Subject: Update test result
- Using old test result.
+ The upstream testsuite is using an embedded pygments version, which
+ at the moment of writing this is 2.0pre. The version in Debian is
+ slightly different (2.0rc1) and there are some minor mismatches. Most
+ importantly, the Debian version is unable to find a good lexer for
+ ambigous code "a". It is fixed by forcing it to use Ruby lexer.
 
  Already reported upstream https://github.com/tmm1/pygments.rb/issues/118
 Author: Per Andersson <avtob...@gmail.com>
 ---
 --- a/test/test_pygments.rb
 +++ b/test/test_pygments.rb
-@@ -32,7 +32,7 @@
-   def test_highlight_works_with_larger_files
-     code = P.highlight(REDIS_CODE)
-     assert_match 'used_memory_peak_human', code
--    assert_equal 455203, code.bytesize.to_i
-+    assert_equal 454107, code.bytesize.to_i
+@@ -88,7 +88,7 @@
    end
  
-   def test_returns_nil_on_timeout
+   def test_highlight_works_with_single_character_input
+-    code = P.highlight("a")
++    code = P.highlight("a", :lexer => 'ruby')
+     assert_match 'a</span>', code
+   end
+ 
+@@ -283,5 +283,3 @@
+     assert list['Html'][:aliases].include?('html')
+   end
+ end
+-
+-

Reply via email to