Skip to content

Commit

Permalink
test: failing multibyte unicode test
Browse files Browse the repository at this point in the history
From #2410
  • Loading branch information
flavorjones committed Jun 8, 2022
1 parent 486d734 commit b19669c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@ jobs:
matrix:
image: ["ubuntu", "ubuntu32"]
sys: ["enable"]
env:
LANG: "en_US.UTF-8"
runs-on: ubuntu-latest
container:
image: ghcr.io/sparklemotion/nokogiri-test:${{matrix.image}}
Expand Down
9 changes: 9 additions & 0 deletions test/xml/test_c14n.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# coding: utf-8
# frozen_string_literal: true

require "helper"
Expand Down Expand Up @@ -237,6 +238,14 @@ def test_wrong_params
assert_raises(TypeError) { doc.canonicalize(nil, :wrong_type) }
doc.canonicalize(nil, nil, :wrong_type)
end

def test_multibyte_unicode
# https://github.com/sparklemotion/nokogiri/issues/2410
doc = Nokogiri.XML(%{<foo>𡏅</foo>}, nil, "EUC-JP")
expected = %{<foo>陝</foo>}
result = doc.canonicalize
assert_equal(expected, result)
end
end
end
end

0 comments on commit b19669c

Please sign in to comment.