upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/runtime/test/gameinput_test.cpp
diff options
context:
space:
mode:
authorRafael <rafaelalvesp2005@gmail.com>2026-11-22 13:19:36 -0300
committerRafael <rafaelalvesp2005@gmail.com>2026-11-22 13:19:36 -0300
commitc950b735e49b1da295c216eacef27b021f2f1a2e (patch)
tree11f18b8bad3bf245b16f3263cc05ed63fdf4cfe5 /runtime/test/gameinput_test.cpp
parent4eb6155d3ac4f9d3fadb0d095c4ce13e76783615 (diff)
gamedata_xml: count the comments of a document the parser cannot finish
Since 93211578 comments are counted from iterparse "comment" events, which is right for a well-formed document (comment-like text in CDATA is not a comment). But a truncated or tail-only document stops the parser at the error, and the comments after it were never counted. When parsing fails, the comment starts are now counted in the bytes, skipping CDATA sections (an unclosed one runs to the end). Real data (counts only), the common.rpf carve: --check reports 507 comment starts (412 in 257 declaration-bearing documents), as docs/gamedata.md:471 says; main reported 412 (412). The 95 missing ones were in 2 truncated tail-only documents. Tests: test_comments_in_a_document_that_does_not_parse_are_counted (unclosed root, tail-only document, CDATA closed and cut off; main: the tail-only case gives 0). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'runtime/test/gameinput_test.cpp')
0 files changed, 0 insertions, 0 deletions