Add regression test for #370
This commit is contained in:
parent
a6b1929d37
commit
83ad25ea1d
|
@ -76,6 +76,7 @@ public class TestXPath extends BaseTest {
|
||||||
"//expr/!primary", // anything but primary under any expr node
|
"//expr/!primary", // anything but primary under any expr node
|
||||||
"//!*", // nothing anywhere
|
"//!*", // nothing anywhere
|
||||||
"/!*", // nothing at root
|
"/!*", // nothing at root
|
||||||
|
"//expr//ID", // any ID under any expression (tests antlr/antlr4#370)
|
||||||
};
|
};
|
||||||
String expected[] = {
|
String expected[] = {
|
||||||
"[func, func]",
|
"[func, func]",
|
||||||
|
@ -97,6 +98,7 @@ public class TestXPath extends BaseTest {
|
||||||
"[expr, expr, expr, expr, expr, expr]",
|
"[expr, expr, expr, expr, expr, expr]",
|
||||||
"[]",
|
"[]",
|
||||||
"[]",
|
"[]",
|
||||||
|
"[y, x]",
|
||||||
};
|
};
|
||||||
|
|
||||||
for (int i=0; i<xpath.length; i++) {
|
for (int i=0; i<xpath.length; i++) {
|
||||||
|
|
Loading…
Reference in New Issue