Sha256: 62de69b03b4f7d3cc3fe4984a29f9e05448996e641c7db4bdac17d445a476286

Contents?: true

Size: 483 Bytes

Versions: 45

Compression:

Stored size: 483 Bytes

Contents

require File.expand_path(File.join(File.dirname(__FILE__), '..', "helper"))
require File.join(File.dirname(__FILE__),"load_files")

class TestParser < Nokogiri::TestCase
  include Nokogiri

  def test_roundtrip
    @basic = Hpricot.parse(TestFiles::BASIC)
    %w[link link[2] body #link1 a p.ohmy].each do |css_sel|
      ele = @basic.at(css_sel)
      assert_equal ele, @basic.at(ele.css_path), ele.css_path
      assert_equal ele, @basic.at(ele.xpath), ele.xpath
    end
  end
end

Version data entries

45 entries across 45 versions & 2 rubygems

Version Path
nokogiri-1.1.1-x86-mswin32-60 test/hpricot/test_paths.rb
nokogiri-1.0.7-x86-mswin32-60 test/hpricot/test_paths.rb
nokogiri-1.1.0-x86-mswin32-60 test/hpricot/test_paths.rb
nokogiri-1.1.1-java test/hpricot/test_paths.rb
nokogiri-1.1.0 test/hpricot/test_paths.rb
nokogiri-1.2.0-x86-mswin32-60 test/hpricot/test_paths.rb
nokogiri-1.2.0-java test/hpricot/test_paths.rb
nokogiri-1.1.1 test/hpricot/test_paths.rb
nokogiri-1.2.0 test/hpricot/test_paths.rb
nokogiri-1.2.1-java test/hpricot/test_paths.rb
nokogiri-1.2.2 test/hpricot/test_paths.rb
nokogiri-1.2.2-x86-mswin32-60 test/hpricot/test_paths.rb
nokogiri-1.2.1 test/hpricot/test_paths.rb
nokogiri-1.2.1-x86-mswin32-60 test/hpricot/test_paths.rb
nokogiri-1.2.2-java test/hpricot/test_paths.rb
nokogiri-1.2.3-x86-mswin32-60 test/hpricot/test_paths.rb
nokogiri-1.3.0-java test/hpricot/test_paths.rb
nokogiri-1.2.3-java test/hpricot/test_paths.rb
nokogiri-1.2.3 test/hpricot/test_paths.rb
nokogiri-1.3.0-x86-mswin32 test/hpricot/test_paths.rb