Skip to content

test: add tests for escape-hex-write-handler - #1001

Open
nkuprins wants to merge 2 commits into
apache:mainfrom
nkuprins:test/escape-hex-write-handler
Open

test: add tests for escape-hex-write-handler#1001
nkuprins wants to merge 2 commits into
apache:mainfrom
nkuprins:test/escape-hex-write-handler

Conversation

@nkuprins

@nkuprins nkuprins commented Aug 9, 2026

Copy link
Copy Markdown
Contributor

Related: #1000

Purpose of the pull request

EscapeHexCellWriteHandler has no tests. It used to have them, but they were deleted by accident (read #1000).

This PR is not a blind restore of those lost tests! I took a different approach; for example, @ParameterizedTest were used for better scalability and readability, etc.

What's changed?

  • Two parameterised tables covering the escaping rule itself. Seven inputs that must be rewritten (_xHHHH_ to _x005F_xHHHH_) and eight that must be left exactly as typed.
  • Non-idempotency: an already-escaped literal is escaped again.
  • Guard tests for the inputs the handler must not act on: non-STRING cell data, a null WriteCellData, and a STRING holding a null value.
  • One end-to-end case, parameterised over XLSX/XLS/CSV with @ExcelFormatSource: write a file through Fesod with the handler registered, read it back, and require the caller's literal. It sits in its own class tagged ROUND_TRIP, which keeps the rest tagged UNIT.

Checklist

  • I have read the Contributor Guide.
  • I have written the necessary doc or comment.
  • I have added the necessary unit tests and all cases have passed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant