Ruby 1.9 Compatibility
Completely removed the html5lib sanitizer. Fixed the string-handling to work in both Ruby 1.8.x and 1.9.2. There are still, inexplicably, two functional tests that fail. But the rest seems to work quite well.
This commit is contained in:
parent
79c8572053
commit
a6429f8c22
142 changed files with 519 additions and 843 deletions
16
attic/vendor/plugins/HTML5lib/test/test_cli.rb
vendored
Normal file
16
attic/vendor/plugins/HTML5lib/test/test_cli.rb
vendored
Normal file
|
@ -0,0 +1,16 @@
|
|||
require File.join(File.dirname(__FILE__), 'preamble')
|
||||
require "html5/cli"
|
||||
|
||||
class TestCli < Test::Unit::TestCase
|
||||
def test_open_input
|
||||
assert_equal $stdin, HTML5::CLI.open_input('-')
|
||||
assert_kind_of StringIO, HTML5::CLI.open_input('http://whatwg.org/')
|
||||
assert_kind_of File, HTML5::CLI.open_input('testdata/sites/google-results.htm')
|
||||
end
|
||||
|
||||
def test_parse_opts
|
||||
HTML5::CLI.parse_opts [] # TODO test defaults
|
||||
assert_equal 'hpricot', HTML5::CLI.parse_opts(['-b', 'hpricot']).treebuilder
|
||||
assert_equal 'hpricot', HTML5::CLI.parse_opts(['--treebuilder', 'hpricot']).treebuilder
|
||||
end
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue