Shared: allow comment starting with # after inline expectation comment

This commit is contained in:
Owen Mansel-Chan
2026-06-15 11:51:56 +01:00
parent f5919875b7
commit d6ade8fe95

View File

@@ -513,10 +513,10 @@ module Make<InlineExpectationsTestSig Impl> {
/**
* RegEx pattern to match a comment containing one or more expected results. The comment must have
* `$` as its first non-whitespace character. Any subsequent character
* is treated as part of the expected results, except that the comment may contain a `//` sequence
* to treat the remainder of the line as a regular (non-interpreted) comment.
* is treated as part of the expected results, except that the comment may contain a `//` or `#`
* sequence to treat the remainder of the line as a regular (non-interpreted) comment.
*/
private string expectationCommentPattern() { result = "\\s*\\$ ((?:[^/]|/[^/])*)(?://.*)?" }
private string expectationCommentPattern() { result = "\\s*\\$ ((?:[^/]|/[^/])*)(?:(//|#).*)?" }
/**
* The possible columns in an expectation comment. The `TDefaultColumn` branch represents the first