From c189245cda6020e46179bb1d0c9f54497440883b Mon Sep 17 00:00:00 2001 From: Duarte Meneses Date: Tue, 15 Mar 2016 14:58:03 +0100 Subject: SONAR-6719 Wrong casing when indexing individual files lead to issue during scm blame --- .../sonar/batch/mediumtest/fs/FileSystemMediumTest.java | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'sonar-batch/src') diff --git a/sonar-batch/src/test/java/org/sonar/batch/mediumtest/fs/FileSystemMediumTest.java b/sonar-batch/src/test/java/org/sonar/batch/mediumtest/fs/FileSystemMediumTest.java index 564a8ce247f..bb669ceec00 100644 --- a/sonar-batch/src/test/java/org/sonar/batch/mediumtest/fs/FileSystemMediumTest.java +++ b/sonar-batch/src/test/java/org/sonar/batch/mediumtest/fs/FileSystemMediumTest.java @@ -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"); } } -- cgit v1.2.3