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
tenderlove-nokogiri-0.0.0-x86-mswin32-60 test/hpricot/test_paths.rb
tenderlove-nokogiri-0.0.0.20081001111445 test/hpricot/test_paths.rb
nokogiri-1.3.2-x86-mswin32 test/hpricot/test_paths.rb
nokogiri-1.3.2-x86-mingw32 test/hpricot/test_paths.rb
nokogiri-1.3.2-java test/hpricot/test_paths.rb
nokogiri-1.3.0-x86-mingw32 test/hpricot/test_paths.rb
nokogiri-1.3.2 test/hpricot/test_paths.rb
nokogiri-1.0.0-x86-mswin32-60 test/hpricot/test_paths.rb
nokogiri-1.0.0 test/hpricot/test_paths.rb
nokogiri-1.0.1 test/hpricot/test_paths.rb
nokogiri-1.0.3-x86-mswin32-60 test/hpricot/test_paths.rb
nokogiri-1.0.4-x86-mswin32-60 test/hpricot/test_paths.rb
nokogiri-1.0.3 test/hpricot/test_paths.rb
nokogiri-1.0.2 test/hpricot/test_paths.rb
nokogiri-1.0.5-x86-mswin32-60 test/hpricot/test_paths.rb
nokogiri-1.0.4 test/hpricot/test_paths.rb
nokogiri-1.0.6-x86-mswin32-60 test/hpricot/test_paths.rb
nokogiri-1.0.6 test/hpricot/test_paths.rb
nokogiri-1.0.5 test/hpricot/test_paths.rb
nokogiri-1.1.1-java test/hpricot/test_paths.rb