Added test for issue #494 #502

Closed
wants to merge 4 commits into from

3 participants

@sglee77

Test failed for Pure Java.

@yokolet
Sparkle Motion member

How did you get your nokogiri?

Both 'nokogiri/css/parser' and 'nokogiri/css/parser' are there and can be loaded correctly, even on RedBridge.
So, I think your nokogiri is somehow broken. Would you remove nokogiri gem and reinstall? Then, run rake again?

I didn't install nokogiri gem. I pulled down the latest source from nokogiri repo. and set the path for RedBridge. Please see my gist - https://gist.github.com/1095486. If you take a look at the repo. here - https://github.com/tenderlove/nokogiri/tree/master/lib/nokogiri/css, I don't see parser.rb and tokenizer.rb. Those two missing files gave me a lot of grief when trying to run a test file on RedBridge.

Please let me know if I am missing something.

Sparkle Motion member

Ah, I see. You need to compile before use it when Nokogiri is cloned out from git repo. The instructions is https://github.com/tenderlove/nokogiri/wiki/Pure-Java-Nokogiri-for-JRuby (the very bottom).

But, there was a problem on a platform without MinGW installed. I fixed the problem in rev. 4338f17, so please fetch the latest again and build Nokogiri. Then, your problem will be solved.

Sparkle Motion member

Would you try "rake clean" using CRuby (not JRuby), then "rake" . If Nokogiri's all tests pass on CRuby , you can build pure Java version. Make sure you are following the build instruction.

I managed to resolve the error and ran the program with RedBridge successfully. But, I am getting the following test failures. I assume they are expected?:

Finished tests in 14.882000s, 71.2942 tests/s, 159.3200 assertions/s.

1) Failure:
test_document_html_charset(Nokogiri::HTML::TestDocumentEncodingDetection) [./test/html/test_document_encoding.rb:101]:
Expected: "iso-2022-jp"
Actual: nil

2) Failure:
test_broken_encoding(Nokogiri::XML::SAX::TestPushParser) [./test/xml/sax/test_push_parser.rb:150]:
Expected: "Gau\337"
Actual: "Gau"

1061 tests, 2371 assertions, 2 failures, 0 errors, 2 skips
rake aborted!
Command failed with status (1): [/Users/sglee77/work/git/jruby/bin/jruby -w...]

Tasks: TOP => default => test
(See full trace by running task with --trace)

Sparkle Motion member

Good to hear.

See my comment on issue#496 ( https://github.com/tenderlove/nokogiri/issues/496 ). Currently, pure Java version has these two failures.

@jvshahid jvshahid closed this in 68e1e98 Nov 12, 2013
@jvshahid
Sparkle Motion member

I merge the test which passes on master.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment