Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: test with ruby 3.3, accommodate new libxml2 behavior #630

Merged
merged 2 commits into from
Dec 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci-test.yml
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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