diff options
-rwxr-xr-x | api/src/main/java/org/semver/Version.java | 2 | ||||
-rwxr-xr-x | api/src/test/java/org/semver/VersionTest.java | 5 |
2 files changed, 6 insertions, 1 deletions
diff --git a/api/src/main/java/org/semver/Version.java b/api/src/main/java/org/semver/Version.java index 4f73e4f..4cb54db 100755 --- a/api/src/main/java/org/semver/Version.java +++ b/api/src/main/java/org/semver/Version.java @@ -46,7 +46,7 @@ public final class Version implements Comparable<Version> { private static final Pattern DIGITS_ONLY = Pattern.compile("\\d+"); - private static final String SNAPSHOT_VERSION_SUFFIX = "-SNAPSHOT"; + private static final String SNAPSHOT_VERSION_SUFFIX = "SNAPSHOT"; private final int major; private final int minor; diff --git a/api/src/test/java/org/semver/VersionTest.java b/api/src/test/java/org/semver/VersionTest.java index bdefa5a..6fbcf47 100755 --- a/api/src/test/java/org/semver/VersionTest.java +++ b/api/src/test/java/org/semver/VersionTest.java @@ -97,6 +97,11 @@ public class VersionTest { } @Test + public void shouldBeSnapshotVersion() { + Assert.assertTrue(Version.parse("1.5.30-SNAPSHOT").isSnapshot()); + } + + @Test public void isNewer() { Assert.assertTrue(Version.parse("3.2.3").compareTo(Version.parse("3.2-M1-SNAPSHOT")) > 0); Assert.assertTrue(Version.parse("1.0.0").compareTo(Version.parse("0.0.0")) > 0); |