Fredrick Eisele created TINKERPOP-2683:
------------------------------------------
Summary: 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
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)