Skip to content

Add integration tests for conversion operator (@) and convert()#1334

Merged
harehare merged 2 commits intofeat/convert-operator-supportfrom
copilot/sub-pr-1320
Feb 25, 2026
Merged

Add integration tests for conversion operator (@) and convert()#1334
harehare merged 2 commits intofeat/convert-operator-supportfrom
copilot/sub-pr-1320

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Feb 25, 2026

The @ operator and convert() function lacked integration tests in integration_tests.rs, leaving the full evaluation path untested despite thorough unit tests in convert.rs.

Changes

  • Integration tests (crates/mq-lang/tests/integration_tests.rs): Added 14 test cases following the shift-operator pattern, covering:
    • convert() function call form
    • @ operator with heading symbols (:h1, :h2) and string markers ("#", "##")
    • @ operator with encoding targets: :base64, :uri, :urid, :sh
    • @ operator with Markdown structure targets: ">", "-", "~~", "**", "--"
// Examples of the new test cases
"\"Hello\" @ :h1"         // → Heading { depth: 1, values: ["Hello"] }
"\"text\" @ :base64"      // → String("dGV4dA==")
"\"hello world\" @ :uri"  // → String("hello%20world")
"\"Hello\" @ \">\""       // → Blockquote { values: ["Hello"] }

✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI changed the title [WIP] Address feedback on conversion operators implementation Add integration tests for conversion operator (@) and convert() Feb 25, 2026
Copilot AI requested a review from harehare February 25, 2026 12:46
@harehare harehare marked this pull request as ready for review February 25, 2026 12:52
@harehare harehare merged commit 98557b8 into feat/convert-operator-support Feb 25, 2026
@harehare harehare deleted the copilot/sub-pr-1320 branch February 25, 2026 12:52
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