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 7, 2022
1 parent 486d734 commit 5edd5de
Showing 1 changed file with 9 additions and 0 deletions.
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 5edd5de

Please sign in to comment.