Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

whitewash test error with libxml 2.9.1 #60

Closed
ktdreyer opened this issue Jan 2, 2014 · 5 comments

Comments

Projects
None yet
2 participants
@ktdreyer
Copy link
Contributor

commented Jan 2, 2014

I'm seeing a test failure with the newer LibXML 2.9.0 in Fedora 19 and above:

=> testing with Nokogiri {"warnings"=>["Nokogiri was built against LibXML version 2.9.0, but has dynamically loaded 2.9.1"], "nokogiri"=>"1.5.9", "ruby"=>{"version"=>"2.0.0", "platform"=>"i386-linux", "description"=>"ruby 2.0.0p353 (2013-11-22 revision 43784) [i386-linux]", "engine"=>"ruby"}, "libxml"=>{"binding"=>"extension", "compiled"=>"2.9.0", "loaded"=>"2.9.1"}}

The same test succeeds on CentOS 6, with Ruby 1.9.3 and LibXML 2.8.0:

=> testing with Nokogiri {"warnings"=>[], "nokogiri"=>"1.6.1", "ruby"=>{"version"=>"1.9.3", "platform"=>"x86_64-linux", "description"=>"ruby 1.9.3p327 (2012-11-10 revision 37606) [x86_64-linux]", "engine"=>"ruby"}, "libxml"=>{"binding"=>"extension", "source"=>"packaged", "libxml2_path"=>"/home/gitoriousci193/.gems/gems/nokogiri-1.6.1/ports/x86_64-redhat-linux/libxml2/2.8.0", "libxslt_path"=>"/home/gitoriousci193/.gems/gems/nokogiri-1.6.1/ports/x86_64-redhat-linux/libxslt/1.1.26", "compiled"=>"2.8.0", "loaded"=>"2.8.0"}}

The failing test is this one:

  1) Failure:
IntegrationTestAdHoc#test_fragment_whitewash_on_microsofty_markup [/builddir/bui
ld/BUILD/loofah-1.2.1/usr/share/gems/gems/loofah-1.2.1/test/integration/test_ad_
hoc.rb:146]:
--- expected
+++ actual
@@ -1 +1,4 @@
-"<p>Foo <b>BOLD</b></p>"
+"
+
+<p>Foo <b>BOLD</b></p>
+"

For some reason, nokogiri must be inserting some blank lines there.

I looked at the Travis builds, and apparently Travis is using the older LibXML 2.8.0, which might explain why we haven't seen this fail in Travis yet.

@flavorjones

This comment has been minimized.

Copy link
Owner

commented Apr 23, 2014

Nokogiri doesn't support libxml 2.9.0, for a couple of reasons. I'll take a look at later 2.9.x versions when I have some time.

@ktdreyer ktdreyer changed the title whitewash test error with libxml 2.9.0 whitewash test error with libxml 2.9.1 Apr 24, 2014

@ktdreyer

This comment has been minimized.

Copy link
Contributor Author

commented Apr 24, 2014

I've confirmed that the same tests fail with libxml 2.9.1 (Fedora 20).

=> testing with Nokogiri {"warnings"=>[], "nokogiri"=>"1.6.1", "ruby"=>{"version"=>"2.0.0", "platform"=>"x86_64-linux", "description"=>"ruby 2.0.0p353 (2013-11-22 revision 43784) [x86_64-linux]", "engine"=>"ruby"}, "libxml"=>{"binding"=>"extension", "source"=>"system", "compiled"=>"2.9.1", "loaded"=>"2.9.1"}}
@flavorjones

This comment has been minimized.

Copy link
Owner

commented Aug 22, 2014

See related work under Nokogiri at sparklemotion/nokogiri#986

@ktdreyer

This comment has been minimized.

Copy link
Contributor Author

commented May 25, 2015

The tests no longer fail on Fedora 23 with Nokogiri 1.6.6.2, Ruby 2.2.2p95, and libxml 2.9.2.

What do you think about bumping the minimum required version of Nokogiri in loofah.gemspec from 1.5.9 to this newer version?

@flavorjones

This comment has been minimized.

Copy link
Owner

commented Feb 11, 2018

Sorry for the delay in replying and closing this. I'm almost positive this was due to bugs in libxml 2.9.0 and 2.9.1, and modern version of Nokogiri either patched that behavior or have later versions of libxml2 vendored.

Closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.