You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Zoltan Haindrich (JIRA)" <ji...@apache.org> on 2016/05/23 20:56:12 UTC
[jira] [Comment Edited] (SUREFIRE-1250) Regex testcase filtering:
exception when hashmark is regex-quoted
[ https://issues.apache.org/jira/browse/SUREFIRE-1250?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15297064#comment-15297064 ]
Zoltan Haindrich edited comment on SUREFIRE-1250 at 5/23/16 8:55 PM:
---------------------------------------------------------------------
[~tibor17]
well...yes... that really makes it clear..but I do read the paragraph containing that phrase multiple times when i was experiencing this exception; maybe an example would have made it more easier for me to comprehend...
i still think that a custom exception should notify the user in case the regexp usage rules are violated...; maybe even in the case when there are 2 or more {{#}}'s.
if you still think this is not a problem (because it affects only a small portion of users)...then just close this issue as invalid..maybe i'm the only one having issues with it
was (Author: kgyrtkirk):
[~tibor17]
well...yes... that really makes it clear..but I do read the paragraph containing that phrase multiple times when i was experiencing this exception; maybe an example would have made it more easier for me to comprehend...
i still think that a custom exception should notify the user in case the regexp usage rules are violated...; maybe even in the case when there are 2 or more {{#}}'s.
if you still think this is not a problem (because it affects only a small portion of users)...then just close this issue as invalid..i don't mind
> Regex testcase filtering: exception when hashmark is regex-quoted
> -----------------------------------------------------------------
>
> Key: SUREFIRE-1250
> URL: https://issues.apache.org/jira/browse/SUREFIRE-1250
> Project: Maven Surefire
> Issue Type: Bug
> Components: Maven Surefire Plugin
> Affects Versions: 2.19.1
> Reporter: Zoltan Haindrich
> Assignee: Tibor Digana
> Priority: Minor
> Attachments: SUREFIRE-1250.patch
>
>
> i've been using regex to select which tests to run...and i've got some wierd exceptions when executing
> {code}
> mvn test "-Dtest=%regex[.*\Q#\E.*]"
> {code}
> executing the above command results in:
> {code}
> java.util.regex.PatternSyntaxException:
> Illegal/unsupported escape sequence near index 1
> \E.*
> ^
> at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:364)
> at org.apache.maven.surefire.junit4.JUnit4Provider.executeWithRerun(JUnit4Provider.java:274)
> at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:238)
> at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:161)
> {code}
> i noticed earlier that maven might do some black-magic with these regexps in the background ( i know that it should know the class name earlier; to avoid starting testcases which will get entirely excluded...and thats cool )
> ...so..i assume maven does split the regex by the {{#}}; and that's okay - if that can't be avoided; place some pointers in the documentation about it and/or a more descriptive exception could be useful
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)