Skip to content

Add tests#26

Closed
sirreal wants to merge 8 commits intohtml-api/set-mod-html-leading-newlinesfrom
claude/add-data-provider-pre-tags-FO5Uo
Closed

Add tests#26
sirreal wants to merge 8 commits intohtml-api/set-mod-html-leading-newlinesfrom
claude/add-data-provider-pre-tags-FO5Uo

Conversation

@sirreal
Copy link
Owner

@sirreal sirreal commented Feb 5, 2026

No description provided.

The test_modifiable_text_special_pre and test_modifiable_text_special_listing
tests had identical structure, differing only in tag name. Consolidate them
into a single data-provider-driven test.

https://claude.ai/code/session_019ux8qzita5FCCk6v6A9cui
TEXTAREA, like PRE and LISTING, ignores the first newline in its content.
Fold the separate TEXTAREA test into the shared data provider, also adding
an assertEqualHTML check it previously lacked. Use advance_n_tokens to
handle the navigation difference (TEXTAREA is a raw text element reached
in one next_token() call vs two for PRE/LISTING).

https://claude.ai/code/session_019ux8qzita5FCCk6v6A9cui
TEXTAREA is a raw text element with different navigation semantics and
should remain a separate test. Only PRE and LISTING share the same
test structure.

https://claude.ai/code/session_019ux8qzita5FCCk6v6A9cui
@github-actions
Copy link

github-actions bot commented Feb 5, 2026

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

Unlinked Accounts

The following contributors have not linked their GitHub and WordPress.org accounts: @claude.

Contributors, please read how to link your accounts to ensure your work is properly credited in WordPress releases.

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@sirreal sirreal changed the base branch from trunk to html-api/set-mod-html-leading-newlines February 5, 2026 22:18
…a data provider

The test_modifiable_text_special_pre and test_modifiable_text_special_listing
tests had identical structure, differing only in tag name. Consolidate them
into a single data-provider-driven test.

https://claude.ai/code/session_019ux8qzita5FCCk6v6A9cui
…LISTING

Replace the monolithic test_modifiable_text_special_pre_leading_whitespace
with a data-provider-driven test that runs the same 4 cases for both PRE
and LISTING elements. This also addresses the @todo on the former LISTING
test about adding leading whitespace tests.

https://claude.ai/code/session_019ux8qzita5FCCk6v6A9cui
…l_pre_tags

Loop over data_modifiable_text_special_pre_tags() to produce tag names,
so adding a new tag to that data provider automatically covers the
leading whitespace cases too.

https://claude.ai/code/session_019ux8qzita5FCCk6v6A9cui
@sirreal sirreal closed this Feb 6, 2026
@sirreal sirreal deleted the claude/add-data-provider-pre-tags-FO5Uo branch February 6, 2026 10:00
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.

2 participants