Skip to content

Commit 41336d4

Browse files
Marcono1234ObserverOfTime
authored andcommitted
test(querycursor): make test for quantified capture more robust
1 parent a550908 commit 41336d4

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/test/java/io/github/treesitter/jtreesitter/QueryCursorTest.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -177,13 +177,16 @@ void findMatches() {
177177
}
178178

179179
// Verify that `eq?` predicate works with quantified captures
180-
try (var tree = parser.parse("/* 1 */ /* 1 */ /* 1 */").orElseThrow()) {
180+
try (var tree = parser.parse("/* 1 */ /* 1 */ {} /* 1 */ /* 1 */").orElseThrow()) {
181181
var source =
182182
"""
183183
(program
184184
.
185-
(block_comment) @b
186185
(block_comment)+ @a
186+
.
187+
(block)
188+
.
189+
(block_comment)+ @b
187190
(#eq? @a @b))
188191
""";
189192
assertCursor(source, cursor -> {

0 commit comments

Comments
 (0)