]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-6719 Wrong casing when indexing individual files lead to issue during scm blame 841/head
authorDuarte Meneses <duarte.meneses@sonarsource.com>
Tue, 15 Mar 2016 13:58:03 +0000 (14:58 +0100)
committerDuarte Meneses <duarte.meneses@sonarsource.com>
Tue, 15 Mar 2016 14:31:44 +0000 (15:31 +0100)
sonar-batch/src/test/java/org/sonar/batch/mediumtest/fs/FileSystemMediumTest.java

index 564a8ce247f6ec189a864437a58ffdcd58594ea4..bb669ceec00bf1f725d982063f09358377f5dadf 100644 (file)
@@ -234,6 +234,23 @@ public class FileSystemMediumTest {
         .start();
 
       assertThat(result.inputFiles()).hasSize(3);
+      // check that symlink was not resolved to target
+      assertThat(result.inputFiles()).extractingResultOf("path").toString().startsWith(projectDir.toString());
+    }
+  }
+
+  // SONAR-6719
+  @Test
+  public void scanProjectWithWrongCase() {
+    if (System2.INSTANCE.isOsWindows()) {
+      File projectDir = new File("src/test/resources/mediumtest/xoo/sample");
+      TaskResult result = tester
+        .newScanTask(new File(projectDir, "sonar-project.properties"))
+        .property("sonar.sources", "SRC")
+        .start();
+
+      assertThat(result.inputFiles()).hasSize(3);
+      assertThat(result.inputFiles()).extractingResultOf("relativePath").startsWith("src");
     }
   }