Source: ruby-pygments
Version: 2.3.0+ds-2.1
Severity: serious

Dear Maintainer,

after the upload of pygments 2.14.0+dfsg-1 your package is failung while
running the autopkgtest.

The failed part in detail is:

RUBYLIB=. GEM_PATH= ruby3.1 -S rake -f debian/ruby-tests.rake
mv lib ./.gem2deb.lib
/usr/bin/ruby3.1 -w -I"test" 
/usr/lib/ruby/gems/3.1.0/gems/rake-13.0.6/lib/rake/rake_test_loader.rb 
"test/test_pygments.rb"  -v
Loaded suite /usr/lib/ruby/gems/3.1.0/gems/rake-13.0.6/lib/rake/rake_test_loader
Started
PygmentsConfigTest:
  test_filters:                                         .: (0.064462)
  test_formatters:                                      .: (0.006962)
  test_lexers:                                          .: (0.021366)
  test_styles:                                          .: (0.000854)
PygmentsCssTest:
  test_css:                                             .: (0.001624)
  test_css_colorful:                                    .: (0.001286)
  test_css_default:                                     .: (0.000903)
  test_css_options:                                     .: (0.000823)
  test_css_prefix:                                      .: (0.000833)
  test_css_prefix_and_options:                          .: (0.000772)
PygmentsHighlightTest:
  test_full_html_highlight:                             F
===============================================================================
Failure: test_full_html_highlight(PygmentsHighlightTest)
/tmp/autopkgtest-lxc.wcymigwk/downtmp/build.qG9/src/test/test_pygments.rb:31:in 
`test_full_html_highlight'
     28:   def test_full_html_highlight
     29:     code = P.highlight(RUBY_CODE)
     30:     assert_match '<span class="ch">#!/usr/bin/ruby</span>', code
  => 31:     assert_equal %(<div class="highlight"><pre><span></span><span 
class="ch">#!/usr/bin/ruby</span>
     32: <span class="nb">puts</span> <span class="s1">&#39;foo&#39;</span>
     33: </pre></div>), code
     34:   end
<"<div class=\"highlight\"><pre><span></span><span 
class=\"ch\">#!/usr/bin/ruby</span>\n" +
"<span class=\"nb\">puts</span> <span class=\"s1\">&#39;foo&#39;</span>\n" +
"</pre></div>"> expected but was
<"<div class=\"highlight\"><pre><span></span><span 
class=\"ch\">#!/usr/bin/ruby</span>\n" +
"<span class=\"nb\">puts</span><span class=\"w\"> </span><span 
class=\"s1\">&#39;foo&#39;</span>\n" +
"</pre></div>">

diff:
  <div class="highlight"><pre><span></span><span 
class="ch">#!/usr/bin/ruby</span>
? <span class="nb">puts</span> <span class="w"> </span><span 
class="s1">&#39;foo&#39;</span>
  </pre></div>
===============================================================================
: (0.154840)
  test_highlight_defaults_to_html:                      .: (0.002140)
  test_highlight_formatter_bbcode:                      .: (0.001620)
  test_highlight_formatter_terminal:                    .: (0.001277)
  test_highlight_on_multi_threads:                      O
===============================================================================
Omission: We do not actually support multithreading 
[test_highlight_on_multi_threads(PygmentsHighlightTest)]
/tmp/autopkgtest-lxc.wcymigwk/downtmp/build.qG9/src/test/test_pygments.rb:114:in
 `test_highlight_on_multi_threads'
===============================================================================
: (0.000826)
  test_highlight_options:                               .: (0.001922)
  test_highlight_still_works_with_invalid_code:         .: (0.046896)
  test_highlight_works_on_utf8:                         .: (0.000949)
  test_highlight_works_on_utf8_all_chars_automatically: .: (0.000811)
  test_highlight_works_on_utf8_automatically:           .: (0.000834)
  test_highlight_works_with_larger_files:               .: (0.033287)
  test_highlight_works_with_multiple_newlines:          .: (0.001873)
  test_highlight_works_with_multiple_utf8:              .: (0.000864)
  test_highlight_works_with_multiple_utf8_and_trailing_newline: .: (0.000906)
  test_highlight_works_with_null_bytes:                 .: (0.000902)
  test_highlight_works_with_trailing_cr:                .: (0.001775)
  test_highlight_works_with_trailing_newline:           .: (0.001717)
  test_version:                                         .: (0.000343)
PygmentsLexerClassTest:
  test_find:                                            .: (0.000268)
  test_find_by_alias:                                   .: (0.000152)
  test_find_by_name:                                    .: (0.000124)
  test_find_lexer_by_extname:                           .: (0.000178)
  test_find_lexer_by_mimetype:                          .: (0.000122)
PygmentsLexerTest:
  test_lexer_by_content:                                .: (0.001258)
  test_lexer_by_filename:                               .: (0.420205)
  test_lexer_by_filename_and_content:                   .: (0.084091)
  test_lexer_by_mimetype:                               .: (0.000676)
  test_lexer_by_name:                                   .: (0.014858)
  test_lexer_by_nothing:                                .: (0.002577)

Finished in 0.881532932 seconds.
-------------------------------------------------------------------------------
39 tests, 60 assertions, 1 failures, 0 errors, 0 pendings, 1 omissions, 0 
notifications
97.3684% passed
-------------------------------------------------------------------------------
44.24 tests/s, 68.06 assertions/s

Updating to 2.3.1 and adding this commit might solve this issue.

https://github.com/pygments/pygments.rb/commit/fe03c274a4b01fc9657a90dba5f16b3e9401082a

Regards
Carsten


-- System Information:
Debian Release: bookworm/sid
  APT prefers testing
  APT policy: (500, 'testing'), (1, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 6.0.0-6-amd64 (SMP w/20 CPU threads; PREEMPT)
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Reply via email to