Skip to content

Commit

Permalink
Merge pull request #630 from sparklemotion/flavorjones-update-ci-ruby-33
Browse files Browse the repository at this point in the history
ci: test with ruby 3.3, accommodate new libxml2 behavior
  • Loading branch information
flavorjones committed Dec 29, 2023
2 parents e6a94fd + 46482f1 commit d52c39a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci-test.yml
Expand Up @@ -32,7 +32,7 @@ jobs:
strategy:
fail-fast: false
matrix:
ruby-version: ["2.6", "2.7", "3.0", "3.1", "3.2", "head", "jruby-9.4", "truffleruby-head"]
ruby-version: ["2.6", "2.7", "3.0", "3.1", "3.2", "3.3", "head", "jruby-9.4", "truffleruby-head"]

runs-on: ubuntu-latest
steps:
Expand Down
9 changes: 7 additions & 2 deletions test/test_mechanize_http_agent.rb
Expand Up @@ -1309,8 +1309,13 @@ def test_response_parse_content_type_encoding_broken_utf_8
page = @agent.response_parse @res, body, @uri

assert_instance_of Mechanize::Page, page
assert_equal 'UTF8', page.encoding
assert_equal 'UTF8', page.parser.encoding

# as of libxml 2.12.0, the result is dependent on how libiconv is built (which aliases are supported)
# if the alias "UTF8" is defined, then the result will be "UTF-8".
# if the alias "UTF8" is not defined, then the result will be "UTF8".
# note that this alias may be defined by Nokogiri itself in its EncodingHandler class.
assert_includes ["UTF8", "UTF-8"], page.encoding
assert_includes ["UTF8", "UTF-8"], page.parser.encoding
end

def test_response_parse_content_type_encoding_garbage
Expand Down

0 comments on commit d52c39a

Please sign in to comment.