diff --git a/cpp/ql/test/TestUtilities/InlineExpectationsTest.qll b/cpp/ql/test/TestUtilities/InlineExpectationsTest.qll index a4d264b2703c..b5e8f4a4d42c 100644 --- a/cpp/ql/test/TestUtilities/InlineExpectationsTest.qll +++ b/cpp/ql/test/TestUtilities/InlineExpectationsTest.qll @@ -173,10 +173,10 @@ abstract class InlineExpectationsTest extends string { /** * 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 + * 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. */ -private string expectationCommentPattern() { result = "\\s*\\$((?:[^/]|/[^/])*)(?://.*)?" } +private string expectationCommentPattern() { result = "\\s*\\$((?:[^/]|[^ ]//|/[^/])*)(?: //.*)?" } /** * The possible columns in an expectation comment. The `TDefaultColumn` branch represents the first diff --git a/csharp/ql/test/TestUtilities/InlineExpectationsTest.qll b/csharp/ql/test/TestUtilities/InlineExpectationsTest.qll index a4d264b2703c..b5e8f4a4d42c 100644 --- a/csharp/ql/test/TestUtilities/InlineExpectationsTest.qll +++ b/csharp/ql/test/TestUtilities/InlineExpectationsTest.qll @@ -173,10 +173,10 @@ abstract class InlineExpectationsTest extends string { /** * 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 + * 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. */ -private string expectationCommentPattern() { result = "\\s*\\$((?:[^/]|/[^/])*)(?://.*)?" } +private string expectationCommentPattern() { result = "\\s*\\$((?:[^/]|[^ ]//|/[^/])*)(?: //.*)?" } /** * The possible columns in an expectation comment. The `TDefaultColumn` branch represents the first diff --git a/java/ql/test/TestUtilities/InlineExpectationsTest.qll b/java/ql/test/TestUtilities/InlineExpectationsTest.qll index a4d264b2703c..b5e8f4a4d42c 100644 --- a/java/ql/test/TestUtilities/InlineExpectationsTest.qll +++ b/java/ql/test/TestUtilities/InlineExpectationsTest.qll @@ -173,10 +173,10 @@ abstract class InlineExpectationsTest extends string { /** * 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 + * 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. */ -private string expectationCommentPattern() { result = "\\s*\\$((?:[^/]|/[^/])*)(?://.*)?" } +private string expectationCommentPattern() { result = "\\s*\\$((?:[^/]|[^ ]//|/[^/])*)(?: //.*)?" } /** * The possible columns in an expectation comment. The `TDefaultColumn` branch represents the first diff --git a/python/ql/test/TestUtilities/InlineExpectationsTest.qll b/python/ql/test/TestUtilities/InlineExpectationsTest.qll index a4d264b2703c..b5e8f4a4d42c 100644 --- a/python/ql/test/TestUtilities/InlineExpectationsTest.qll +++ b/python/ql/test/TestUtilities/InlineExpectationsTest.qll @@ -173,10 +173,10 @@ abstract class InlineExpectationsTest extends string { /** * 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 + * 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. */ -private string expectationCommentPattern() { result = "\\s*\\$((?:[^/]|/[^/])*)(?://.*)?" } +private string expectationCommentPattern() { result = "\\s*\\$((?:[^/]|[^ ]//|/[^/])*)(?: //.*)?" } /** * The possible columns in an expectation comment. The `TDefaultColumn` branch represents the first diff --git a/ruby/ql/test/TestUtilities/InlineExpectationsTest.qll b/ruby/ql/test/TestUtilities/InlineExpectationsTest.qll index a4d264b2703c..b5e8f4a4d42c 100644 --- a/ruby/ql/test/TestUtilities/InlineExpectationsTest.qll +++ b/ruby/ql/test/TestUtilities/InlineExpectationsTest.qll @@ -173,10 +173,10 @@ abstract class InlineExpectationsTest extends string { /** * 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 + * 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. */ -private string expectationCommentPattern() { result = "\\s*\\$((?:[^/]|/[^/])*)(?://.*)?" } +private string expectationCommentPattern() { result = "\\s*\\$((?:[^/]|[^ ]//|/[^/])*)(?: //.*)?" } /** * The possible columns in an expectation comment. The `TDefaultColumn` branch represents the first