File tree Expand file tree Collapse file tree 2 files changed +19
-4
lines changed Expand file tree Collapse file tree 2 files changed +19
-4
lines changed Original file line number Diff line number Diff line change 11name = " EzXML"
22uuid = " 8f5d6c58-4d21-5cfd-889c-e3ad7ee6a615"
33authors = [
" Kenta Sato <[email protected] >" ]
4- version = " 1.2.1 "
4+ version = " 1.2.2 "
55
66[deps ]
77Printf = " de0858da-6303-5e67-8744-51eddeeeb8d7"
88XML2_jll = " 02c8fc9c-b97f-50b9-bbe4-9be30ff0a78a"
99
1010[compat ]
1111Printf = " 1.3"
12- XML2_jll = " 2.9.9 - 2.13 "
12+ XML2_jll = " 2.9.9 - 2.14 "
1313julia = " 1.6"
Original file line number Diff line number Diff line change 114114 end
115115 @test isa (doc, EzXML. Document)
116116 @test nodetype (doc. node) === EzXML. HTML_DOCUMENT_NODE
117- @test occursin (" Warning: XMLError: htmlParseCharRef: missing semicolon from HTML parser (code: 7, line: 2)" , messages)
118- @test occursin (" Warning: XMLError: htmlParseCharRef: missing semicolon from HTML parser (code: 7, line: 4)" , messages)
117+ # in XML2_jll v2.14 "Several non-standard syntax warnings were removed."
118+ # https://github.com/GNOME/libxml2/blob/v2.14.4/NEWS#L90
119+ # @test occursin("Warning: XMLError: htmlParseCharRef: missing semicolon from HTML parser (code: 7, line: 2)", messages)
120+ # @test occursin("Warning: XMLError: htmlParseCharRef: missing semicolon from HTML parser (code: 7, line: 4)", messages)
119121 end
120122end
121123
190192 @test_throws EzXML. XMLError parsexml (" <gepa?>jgo<<<><<" )
191193 end
192194 @test occursin (" errors; throwing the first one" , messages)
195+
196+ # This is to test warnings are logged properly
197+ doc, messages = capture_logging_messages () do
198+ parsexml ("""
199+ <?xml version="1.0"?>
200+ <root xmlns:ns="http://example.com">
201+ <ns:element>
202+ <undeclared:child>content</undeclared:child>
203+ </ns:element>
204+ </root>
205+ """ )
206+ end
207+ @test ! isempty (messages)
193208 end
194209
195210 @testset " HTML" begin
You can’t perform that action at this time.
0 commit comments