From ff99fa5d373ead233c8196fad02ccc9d1f131e66 Mon Sep 17 00:00:00 2001 From: Lars Kanis Date: Fri, 7 Feb 2020 09:20:30 +0100 Subject: [PATCH] Fix failing test case on musl based Linux Musl doesn't recognize cp932 encoding. It also fails when used on the command line with iconv. For this test case cp932 can be replaced by Shift_JIS, which is identical for the characters in question and that is handled by musl. Error was: 1) Error: Nokogiri::HTML::TestDocumentEncoding#test_encoding_without_charset: ArgumentError: invalid byte sequence in UTF-8 /home/lars/comcard/nokogiri/test/html/test_document_encoding.rb:26:in `test_encoding_without_charset' Related to #1983 --- test/html/test_document_encoding.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/html/test_document_encoding.rb b/test/html/test_document_encoding.rb index 9f6292b9bfd..5e664eca1e5 100644 --- a/test/html/test_document_encoding.rb +++ b/test/html/test_document_encoding.rb @@ -19,7 +19,7 @@ def test_encoding end def test_encoding_without_charset - doc = Nokogiri::HTML File.open(SHIFT_JIS_NO_CHARSET, 'r:cp932:cp932').read + doc = Nokogiri::HTML File.open(SHIFT_JIS_NO_CHARSET, 'r:Shift_JIS:Shift_JIS').read hello = "こんにちは"