Skip to content

Fix XPath boolean result output#196

Merged
sibprogrammer merged 1 commit into
sibprogrammer:masterfrom
sjh9714:fix-xpath-boolean-results
May 26, 2026
Merged

Fix XPath boolean result output#196
sibprogrammer merged 1 commit into
sibprogrammer:masterfrom
sjh9714:fix-xpath-boolean-results

Conversation

@sjh9714
Copy link
Copy Markdown
Contributor

@sjh9714 sjh9714 commented May 19, 2026

Summary

Fixes XPath boolean query results.

What changed

  • Added regression coverage for boolean(...) XPath results.
  • Updated XPathQuery to print boolean values instead of treating them as unknown result types.
  • Preserved existing number, string, and node iterator output handling.

Why

Issue #188 reports that xq -x 'boolean(//root)' fails with unknown type error: true instead of printing true.\n\n## Testing\n\n- go test ./internal/utils -run TestXPathQueryBoolean\n- go test ./internal/utils\n- go test ./...\n\nFixes #188

@sibprogrammer sibprogrammer merged commit 133cccb into sibprogrammer:master May 26, 2026
2 checks passed
@sibprogrammer
Copy link
Copy Markdown
Owner

@sjh9714 Thank you!

@codecov-commenter
Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 80.78%. Comparing base (a4e001c) to head (a0ce12f).
⚠️ Report is 2 commits behind head on master.
❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #196      +/-   ##
==========================================
+ Coverage   80.73%   80.78%   +0.05%     
==========================================
  Files           5        5              
  Lines         711      713       +2     
==========================================
+ Hits          574      576       +2     
  Misses         94       94              
  Partials       43       43              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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.

3 participants