Skip to content

Add XPath JSoup filter tests for XSoup backward compatibility#1857

Merged
rzo1 merged 3 commits intomainfrom
test-xpath-xsoup
Mar 31, 2026
Merged

Add XPath JSoup filter tests for XSoup backward compatibility#1857
rzo1 merged 3 commits intomainfrom
test-xpath-xsoup

Conversation

@jnioche
Copy link
Copy Markdown
Contributor

@jnioche jnioche commented Mar 31, 2026

Summary

  • Adds 6 new tests to JSoupFiltersTest covering XPath features used by the JSoup XPathFilter: attribute extraction (/@attr), tidyText(), allText(), html() functions, uppercase element name handling, and fallback expression logic.
  • Assertions are intentionally written to pass with both XSoup and the planned JSoup replacement (Investigate if XSoup is still needed #1407), enabling safe validation of the migration.
  • Adds a dedicated test HTML page and JSoup filter config to isolate XPath-specific behavior.

Test plan

  • All 10 tests pass on this branch (XSoup)
  • All 10 shared tests also pass on branch 1407 (JSoup replacement)

🤖 Generated with Claude Code

jnioche and others added 2 commits March 31, 2026 09:37
Tests cover attribute extraction (/@attr), tidyText(), allText(),
html() functions, uppercase element name handling, and fallback
expression logic. Assertions are written to pass with both the
current XSoup implementation and the planned JSoup replacement.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Julien Nioche <julien@digitalpebble.com>
@@ -0,0 +1,21 @@
<!DOCTYPE html>
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Header missing. This fails the RAT checks.

Signed-off-by: Julien Nioche <julien@digitalpebble.com>
@rzo1 rzo1 added this to the 3.5.2 milestone Mar 31, 2026
@rzo1 rzo1 merged commit 7f10122 into main Mar 31, 2026
2 checks passed
@rzo1 rzo1 deleted the test-xpath-xsoup branch March 31, 2026 18:57
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