-
Bug
-
Resolution: Fixed
-
P3
-
1.4.0
-
beta2
-
sparc
-
solaris_8
-
Verified
Matcher.groupCont() returns unexpected value for few tests.
Following is the result of the testcase, where "Result" and "Expected" means matcher.groupCount() .
Pattern: (?(?!a)a|b)
Input: a
Result: 0
Expected: 1
Pattern: (?(?!a)b|a)
Input: a
Result: 0
Expected: 1
Pattern: (?(?=a)b|a)
Input: a
Result: 0
Expected: 1
Pattern: (?(?=a)a|b)
Input: a
Result: 0
Expected: 1
Pattern: (?>a+)b
Input: aaab
Result: 0
Expected: 1
Pattern: ((?>a+)b)
Input: aaab
Result: 1
Expected: 2
Pattern: (?>(a+))b
Input: aaab
Result: 1
Expected: 2
Pattern: ((?>[^()]+)|\([^()]*\))+
Input: ((abc(ade)ufh()()x
Result: 1
Expected: 2
Pattern: round\(((?>[^()]+))\)
Input: _I(round(xs * sz),1)
Result: 1
Expected: 2
testcase location:-
/net/sqesvr/export/xlt/libs/merlin/dev/testbase/src/libs_api_tests/common/java_util/Regex/Matcher/RegexTest.java
Following is the result of the testcase, where "Result" and "Expected" means matcher.groupCount() .
Pattern: (?(?!a)a|b)
Input: a
Result: 0
Expected: 1
Pattern: (?(?!a)b|a)
Input: a
Result: 0
Expected: 1
Pattern: (?(?=a)b|a)
Input: a
Result: 0
Expected: 1
Pattern: (?(?=a)a|b)
Input: a
Result: 0
Expected: 1
Pattern: (?>a+)b
Input: aaab
Result: 0
Expected: 1
Pattern: ((?>a+)b)
Input: aaab
Result: 1
Expected: 2
Pattern: (?>(a+))b
Input: aaab
Result: 1
Expected: 2
Pattern: ((?>[^()]+)|\([^()]*\))+
Input: ((abc(ade)ufh()()x
Result: 1
Expected: 2
Pattern: round\(((?>[^()]+))\)
Input: _I(round(xs * sz),1)
Result: 1
Expected: 2
testcase location:-
/net/sqesvr/export/xlt/libs/merlin/dev/testbase/src/libs_api_tests/common/java_util/Regex/Matcher/RegexTest.java