-
Notifications
You must be signed in to change notification settings - Fork 328
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1568 from jplag/bug/submissionFilePathsMissingSlash
Fixed a bug in the creation of the result due to missing slashes.
- Loading branch information
Showing
3 changed files
with
47 additions
and
1 deletion.
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
26 changes: 26 additions & 0 deletions
26
core/src/test/java/de/jplag/reporting/FilePathUtilTest.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,26 @@ | ||
package de.jplag.reporting; | ||
|
||
import static org.junit.jupiter.api.Assertions.*; | ||
|
||
import org.junit.jupiter.api.Test; | ||
|
||
class FilePathUtilTest { | ||
private static final String JOINED = "left/right"; | ||
private static final String LEFT = "left"; | ||
private static final String RIGHT = "right"; | ||
|
||
@Test | ||
void testJoinPath() { | ||
assertEquals(JOINED, FilePathUtil.joinZipPathSegments(LEFT, RIGHT)); | ||
} | ||
|
||
@Test | ||
void testJoinPathWithLeftSlashSuffix() { | ||
assertEquals(JOINED, FilePathUtil.joinZipPathSegments(LEFT + "/", RIGHT)); | ||
} | ||
|
||
@Test | ||
void testJoinPathWithRightSlashSuffix() { | ||
assertEquals(JOINED, FilePathUtil.joinZipPathSegments(LEFT, "/" + RIGHT)); | ||
} | ||
} |