-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Always front slashes when searching FS
Also adding logging the help determining why some files is not getting picked up.
- Loading branch information
1 parent
4290147
commit 7e237cc
Showing
8 changed files
with
64 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
src/test/java/se/bjurr/violations/lib/reports/ReportsFinderTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package se.bjurr.violations.lib.reports; | ||
|
||
import static org.assertj.core.api.Assertions.assertThat; | ||
|
||
import org.junit.Test; | ||
|
||
public class ReportsFinderTest { | ||
|
||
@Test | ||
public void testThatRegexpIsAlwaysMatchedAgainsFrontSlashes() { | ||
assertThat(ReportsFinder.withFrontSlashes("C:\\any\\thing")) // | ||
.isEqualTo("C:/any/thing"); | ||
assertThat(ReportsFinder.withFrontSlashes("C:\\any\\thing.zip")) // | ||
.isEqualTo("C:/any/thing.zip"); | ||
assertThat(ReportsFinder.withFrontSlashes("/c/any/thing")) // | ||
.isEqualTo("/c/any/thing"); | ||
assertThat(ReportsFinder.withFrontSlashes("/c/any/thing.zip")) // | ||
.isEqualTo("/c/any/thing.zip"); | ||
} | ||
} |