You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Niall Pemberton (JIRA)" <ji...@apache.org> on 2010/03/12 03:13:27 UTC

[jira] Resolved: (SANSELAN-36) Sanselan tests fail on Windows

     [ https://issues.apache.org/jira/browse/SANSELAN-36?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Niall Pemberton resolved SANSELAN-36.
-------------------------------------

    Resolution: Fixed

I have fixed this by adding a *test* dependency to commons-io and use FilenameUtils.separatorsToSystem() to convert the paths:

    http://svn.apache.org/viewvc?view=revision&revision=922115

> Sanselan tests fail on Windows
> ------------------------------
>
>                 Key: SANSELAN-36
>                 URL: https://issues.apache.org/jira/browse/SANSELAN-36
>             Project: Commons Sanselan
>          Issue Type: Test
>            Reporter: Niall Pemberton
>            Priority: Minor
>
> A number of the Sanselan tests fail on windows - all related to the use of the following code with file paths:
> {code}
>        "...".replaceAll("\\\\", System.getProperty("file.separator")
> {code}
> 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

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.