Skip to content

Commit 5b284ba

Browse files
committed
https://github.com/jenkinsci/incrementals-tools/pull/24#discussion_r775963963
1 parent 9ccc5ce commit 5b284ba

File tree

1 file changed

+4
-1
lines changed
  • git-changelist-maven-extension/src/test/java/io/jenkins/tools/incrementals/git_changelist_maven_extension

1 file changed

+4
-1
lines changed

git-changelist-maven-extension/src/test/java/io/jenkins/tools/incrementals/git_changelist_maven_extension/MainTest.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626

2727
import org.apache.maven.artifact.versioning.ComparableVersion;
2828
import static org.hamcrest.CoreMatchers.containsString;
29+
import static org.hamcrest.CoreMatchers.is;
2930
import static org.hamcrest.CoreMatchers.not;
3031
import static org.hamcrest.MatcherAssert.assertThat;
3132
import org.junit.Test;
@@ -42,7 +43,9 @@ public class MainTest {
4243
"pr", "dev",
4344
};
4445
@Test public void alphaBeta() {
45-
String sanitized = Main.sanitize("852b473a2b8c");
46+
String hash = "852b473a2b8c";
47+
String sanitized = Main.sanitize(hash);
48+
assertThat(hash + " has been sanitized to the expected format", sanitized, is("852b_473a_2b_8c"));
4649
String canonical = new ComparableVersion(sanitized).getCanonical();
4750
for (String prerelease : PRERELEASE) {
4851
assertThat(sanitized + " treated as a prerelease", canonical, not(containsString(prerelease)));

0 commit comments

Comments
 (0)