[ 
https://issues.apache.org/jira/browse/TINKERPOP-2683?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17470804#comment-17470804
 ] 

Stephen Mallette commented on TINKERPOP-2683:
---------------------------------------------

> The grammar seems to assume the Groovy grammar as a starting point.

that's just the nature of how the grammar came into existence, since groovy was 
the original script language prior to the grammar. we're trying to reverse that 
now.

If you think i can be solved in the test framework that's fine i think, though 
i still think it's an interesting point for the grammar itself.

> Defective Path in Testing g.io()
> --------------------------------
>
>                 Key: TINKERPOP-2683
>                 URL: https://issues.apache.org/jira/browse/TINKERPOP-2683
>             Project: TinkerPop
>          Issue Type: Bug
>          Components: tinkergraph
>    Affects Versions: 3.5.1
>            Reporter: Fredrick Eisele
>            Priority: Blocker
>              Labels: easyfix, test-stability
>
> I found a small bug in the tinkergraph testing on windows 10. 
> It comes up because the grammar does not allow a '\' ...
> {code:none}
> fragment
> DoubleQuotedStringCharacters
>     :    DoubleQuotedStringCharacter+
>     ;
> fragment
> DoubleQuotedStringCharacter
>     :    ~('"' | '\\')
>     |   JoinLineEscape
>     |    EscapeSequence
>     ;
> {code}
> ```
> ...and the function which locates the g.io() file adds in a '\'.
> [TinkerGraphWorld.java|https://github.com/apache/tinkerpop/blob/53503bfa28ba1de061204fb96835dee856576bbf/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/TinkerGraphWorld.java]
> {code:java}
>     @Override
>     public String changePathToDataFile(final String pathToFileFromGremlin) {
>          return ".." + File.separator + pathToFileFromGremlin;
>     }
> {code}
> The File.separator on linux is a valid character '/' but the problematic '\' 
> character on Windows 10. 
> Which gets called by...
> [StepDefinition.java|https://github.com/apache/tinkerpop/blob/53503bfa28ba1de061204fb96835dee856576bbf/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/features/StepDefinition.java]
> {code:java}
>     private String tryUpdateDataFilePath(final String docString) {
>         final Matcher matcher = ioPattern.matcher(docString);
>         final String gremlin = matcher.matches() ?
>                 docString.replace(matcher.group(1), 
> world.changePathToDataFile(matcher.group(1))) : docString;
>         return gremlin;
>     }
> {code}
> In particular this gets triggered by the 
> [Read.feature|https://github.com/apache/tinkerpop/blob/53503bfa28ba1de061204fb96835dee856576bbf/gremlin-test/features/sideEffect/Read.feature]
>  .



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

Reply via email to