mirror of
https://github.com/chylex/IntelliJ-IdeaVim.git
synced 2025-08-13 06:16:58 +02:00
adding explanatory comment on wierd atomic group test
This commit is contained in:
@@ -911,6 +911,16 @@ class NFATest {
|
||||
|
||||
@Test
|
||||
fun `test atomic group should fail`() {
|
||||
/**
|
||||
* This pattern should fail because the "a*" consumes
|
||||
* all three 'a's, then the last "a" in the pattern
|
||||
* fails to match since all 'a's have been consumed.
|
||||
* Normally, it would try to backtrack and the "a*"
|
||||
* would only consume two 'a's, leaving the last one to
|
||||
* match with "a", but since the "a*" is atomic, it can't
|
||||
* try matching with shorter or longer sub-matches,
|
||||
* therefore the simulation immediately fails.
|
||||
*/
|
||||
assertFailure(
|
||||
"aaa",
|
||||
"\\(a*\\)\\@>a"
|
||||
|
Reference in New Issue
Block a user