[libxml-devel] running tests from svn

Sean Chittenden sean at chittenden.org
Fri Jul 11 14:47:25 EDT 2008


>> 130 tests, 716 assertions, 1 failures, 0 errors
>> rake aborted!
>> Command failed with status (1): [/opt/local/bin/ruby -Ilib:test:ext
>> "/opt/l...]
>>
>> (See full trace by running task with --trace)
>> Exit 1
>
> Yes, I think that is because of the implementation of
> register_error_handler.  I had fixed this in one of my previous
> patches....  Anyway, this seems to do the trick:

Yup, that fixes things... the output is all over the place.  Hrm, this  
works better but is a change in behavior.  I just committed the  
following (NOTE, this is a change in behavior and I am willing to  
revert this, but think this is a step forward, albeit an API change):

Clean up the error handling a bit and change the arguments for  
register_error_handler.

If XML::Parser.register_error_handler() is nil or false, error  
messages will be dropped on the floor.

If XML::Parser.register_error_handler() is true, it will print to  
stderr.

If XML::Parser.register_error_handler() is anything else, it will call  
the proc.  For example:

         XML::Parser.register_error_handler(lambda {|msg| p msg })


Ideally, I'd like it if XML::Parser.register_error_handler() would  
accept an IO object that the library would print to, but that's just a  
nicety (e.g. XML::Parser.register_error_handler($stdout)).  -sc

% rake test
(in /Users/sean/src/ruby-libxml/trunk)
Loaded suite /opt/local/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake/ 
rake_test_loader
Started
..................................................................................................................................
Finished in 0.999928 seconds.

130 tests, 720 assertions, 0 failures, 0 errors


--
Sean Chittenden
sean at chittenden.org





More information about the libxml-devel mailing list