]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-3677 fix another test on MSWindows
authorSimon Brandhof <simon.brandhof@gmail.com>
Thu, 10 Oct 2013 07:34:56 +0000 (09:34 +0200)
committerSimon Brandhof <simon.brandhof@gmail.com>
Thu, 10 Oct 2013 07:34:56 +0000 (09:34 +0200)
sonar-batch/src/test/java/org/sonar/batch/scan/filesystem/DeprecatedFileFiltersTest.java

index 399e4fdfd5b5a4cab778885d0239bc7debc7ecba..46b27649942681f813888d43f5107433b9af7ff1 100644 (file)
@@ -21,6 +21,7 @@ package org.sonar.batch.scan.filesystem;
 
 import com.google.common.collect.ImmutableMap;
 import com.google.common.collect.Maps;
+import org.apache.commons.io.FilenameUtils;
 import org.junit.Rule;
 import org.junit.Test;
 import org.junit.rules.TemporaryFolder;
@@ -72,7 +73,7 @@ public class DeprecatedFileFiltersTest {
     verify(filter).accept(eq(file), argument.capture());
 
     DeprecatedFileFilters.DeprecatedContext context = argument.getValue();
-    assertThat(context.canonicalPath()).isEqualTo(file.getAbsolutePath());
+    assertThat(context.canonicalPath()).isEqualTo(FilenameUtils.separatorsToUnix(file.getAbsolutePath()));
     assertThat(context.relativeDir()).isEqualTo(new File(basedir, "src/main/java"));
     assertThat(context.relativePath()).isEqualTo("Foo.java");
     assertThat(context.type()).isEqualTo(FileType.TEST);