You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by "lihongyi87 (via GitHub)" <gi...@apache.org> on 2026/08/02 03:59:09 UTC

[PR] Add unit tests for ExpressionTokenizer [tomcat]

lihongyi87 opened a new pull request, #1035:
URL: https://github.com/apache/tomcat/pull/1035

   Adds direct unit tests for `org.apache.catalina.ssi.ExpressionTokenizer`, which currently has no dedicated test class. The tokenizer is only exercised indirectly through `ExpressionParseTree` in `TestExpressionParseTree`, which covers only 3 of the 12 token types (`TOKEN_STRING`, `TOKEN_EQ`, `TOKEN_END`).
   
   ## What is covered
   
   - All operator tokens: `(` `)` `=` `!=` `!` `||` `&&` `>` `>=` `<` `<=`
   - String values, including whitespace-separated multi-token expressions
   - Quoted strings (single and double quotes) and escaped quotes
   - Regular expression strings, including escaped slashes
   - Operators mixed with strings (e.g. `a && b`, `!a`, `a >= b`, `(a)`)
   - Edge cases: empty string, whitespace-only input (no tokens)
   
   ## Verification
   
   - All 30 parameterized cases pass
   - Full SSI test suite (`TestExpressionTokenizer`, `TestExpressionParseTree`, `TestRegExpCapture`, `TestSsiServlet`) passes on both NIO and NIO2 connectors


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Re: [PR] Add unit tests for ExpressionTokenizer [tomcat]

Posted by "markt-asf (via GitHub)" <gi...@apache.org>.
markt-asf merged PR #1035:
URL: https://github.com/apache/tomcat/pull/1035


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Re: [PR] Add unit tests for ExpressionTokenizer [tomcat]

Posted by "markt-asf (via GitHub)" <gi...@apache.org>.
markt-asf commented on PR #1035:
URL: https://github.com/apache/tomcat/pull/1035#issuecomment-5252062978

   Thanks for the PR. For future reference please provide PRs against main unless the PR is specific to an older branch.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Re: [PR] Add unit tests for ExpressionTokenizer [tomcat]

Posted by "lihongyi87 (via GitHub)" <gi...@apache.org>.
lihongyi87 commented on PR #1035:
URL: https://github.com/apache/tomcat/pull/1035#issuecomment-5274531541

   Thanks for merging, and thanks for the tip about targeting `main` — I'll do that going forward.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org