void () { test("[within( \"if ('_a:[regex( .*e.* )]) { '_st*; }\" )]'_type 'a = '_b;"); assertEquals("$type$ $a$ = $b$;", myOptions.getSearchPattern()); final MatchVariableConstraint constraint = myOptions.getVariableConstraint(Configuration.CONTEXT_VAR_NAME); assertEquals("\"if ('_a:[regex( .*e.* )]) { '_st*; }\"", constraint.getWithinConstraint()); test("[!within( \"<'_tag:[regex( ul|ol )] />\" )]<li />"); assertEquals("<li />", myOptions.getSearchPattern()); final MatchVariableConstraint constraint2 = myOptions.getVariableConstraint(Configuration.CONTEXT_VAR_NAME); assertEquals("\"<'_tag:[regex( ul|ol )] />\"", constraint2.getWithinConstraint()); assertTrue(constraint2.isInvertWithinConstraint()); test("[within( \"if ('_a:[regex( \".*\" )]) { '_st*; }\" )]'_type 'a = '_b;"); assertEquals("$type$ $a$ = $b$;", myOptions.getSearchPattern()); final MatchVariableConstraint constraint3 = myOptions.getVariableConstraint(Configuration.CONTEXT_VAR_NAME); assertEquals("\"if ('_a:[regex( \".*\" )]) { '_st*; }\"", constraint3.getWithinConstraint()); }