module Nokogiri::Test - nokogiri-1.18.10 Documentation

# module Nokogiri::Test

The `Nokogiri::Test` module should only be used for testing `Nokogiri`. Do NOT use this outside of the `Nokogiri` test suite.

### Public Class Methods

__foreign_error_handler { ... } → nil click to toggle source

Override libxml2’s global error handlers to call the block. This method thus has very little value except to test that `Nokogiri` is properly setting error handlers elsewhere in the code. See test/helper.rb for how this is being used.

    static VALUE
    rb_foreign_error_handler(VALUE klass)
    {
      rb_need_block();
      foreign_error_handler_block = rb_block_proc();
      xmlSetStructuredErrorFunc(NULL, foreign_error_handler);
      return Qnil;
    }