[ https://issues.apache.org/jira/browse/TINKERPOP-3047?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17941991#comment-17941991 ]
ASF GitHub Bot commented on TINKERPOP-3047: ------------------------------------------- Cole-Greer commented on code in PR #3091: URL: https://github.com/apache/tinkerpop/pull/3091#discussion_r2033958043 ########## gremlin-language/src/test/java/org/apache/tinkerpop/gremlin/language/grammar/ReferenceGrammarTest.java: ########## @@ -89,29 +94,73 @@ public class ReferenceGrammarTest extends AbstractGrammarTest { }}; @Parameterized.Parameters(name = "{0}") - public static Iterable<String> queries() throws IOException { - final Set<String> gremlins = new LinkedHashSet<>(DocumentationReader.parse(docsDir)); - gremlins.addAll(FeatureReader.parseGrouped(featureDir, stringMatcherConverters).values().stream().flatMap(Collection::stream).collect(Collectors.toList())); - return gremlins; + public static Iterable<Pair<String, ParserRule>> parseTestItems() throws IOException { + // gremlin scripts from docs + final Set<Pair<String, ParserRule>> scripts = DocumentationReader.parse(docsDir). + stream().map(g -> Pair.with(g, ParserRule.QUERY_LIST)). + collect(Collectors.toCollection(LinkedHashSet::new)); + + // helps make sure we're actually adding test scripts for each load. there are well over 500 gremlin + // examples in the docs so we should have at least that much + int size = scripts.size(); + assert size > 500; Review Comment: Nit: Is there a reason to prefer Java assertions over JUnit assertions? > Grammar does not parse keywords into Map keys > --------------------------------------------- > > Key: TINKERPOP-3047 > URL: https://issues.apache.org/jira/browse/TINKERPOP-3047 > Project: TinkerPop > Issue Type: Bug > Components: language > Affects Versions: 3.7.1 > Reporter: Stephen Mallette > Priority: Critical > > {{[keys: ["a","b"]}} won't work because "keys" ends up being parsed to > {{Column.keys}}. another issue at play is the use of parens to wrap certain > key definitions but not others. it doesn't feel consistent. like, it will > work for {{T}} values but not for something like "edges" which is just a > keyword token. Not sure it's wrong but it requires some examination. -- This message was sent by Atlassian Jira (v8.20.10#820010)