Uploaded image for project: 'Commons Imaging'
  1. Commons Imaging
  2. IMAGING-80

Sanselan tests fail on Windows

    XMLWordPrintableJSON

Details

    • Test
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • None
    • 1.0-alpha1
    • None
    • None

    Description

      A number of the Sanselan tests fail on windows - all related to the use of the following code with file paths:

             "...".replaceAll("\\\\", System.getProperty("file.separator")
      

      The problem is on windows the file separator is a "back slash" character which needs to be escaped in regular expressions.

      This affects:

      • SanselanTestConstants (causes ExceptionIntializedError because the static PHIL_HARVEY_TEST_IMAGE_FOLDER fails when its being initialized with a StringIndexOutOfBoundsException)
      • SanselanGuessFormatTest fails in testGuess_all() and testGuess_unknown() throwing StringIndexOutOfBoundsException
      • PngMultipleRoundtripTest fails in test() throwing StringIndexOutOfBoundsException

      Attachments

        Activity

          People

            Unassigned Unassigned
            niallp Niall Pemberton
            Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: