Uploaded image for project: 'TinkerPop'
  1. TinkerPop
  2. TINKERPOP-2683

Defective Path in Testing g.io()

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 3.5.1
    • None
    • tinkergraph
    • None

    Description

      I found a small bug in the tinkergraph testing on windows 10. 
      It comes up because the grammar does not allow a '\' ...

      
      fragment
      DoubleQuotedStringCharacters
          :    DoubleQuotedStringCharacter+
          ;
      
      fragment
      DoubleQuotedStringCharacter
          :    ~('"' | '\\')
          |   JoinLineEscape
          |    EscapeSequence
          ;
      

      ```
      ...and the function which locates the g.io() file adds in a '\'.
      TinkerGraphWorld.java

          @Override
          public String changePathToDataFile(final String pathToFileFromGremlin) {
               return ".." + File.separator + pathToFileFromGremlin;
          }
      

      The File.separator on linux is a valid character '/' but the problematic '\' character on Windows 10.

      Which gets called by...
      StepDefinition.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;
          }
      

      In particular this gets triggered by the Read.feature .

      Attachments

        Activity

          People

            Unassigned Unassigned
            phreed Fredrick Eisele
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: