diff options
author | Jiri Vanek <[email protected]> | 2013-04-25 14:20:19 +0200 |
---|---|---|
committer | Jiri Vanek <[email protected]> | 2013-04-25 14:20:19 +0200 |
commit | 0cc135f35c17bb59428a28d3cfee2bc2f65c5528 (patch) | |
tree | 9a3060303c908d66a49e7800a038bcade87e72bd /tests/netx/unit/net/sourceforge | |
parent | 7b41471de413b4fe7e8cb2d2551b44541aea3fd7 (diff) |
Splashscreen now strip commit id from released versions
Diffstat (limited to 'tests/netx/unit/net/sourceforge')
-rw-r--r-- | tests/netx/unit/net/sourceforge/jnlp/splashscreen/impls/defaultsplashscreen2012/BasePainterTest.java | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/netx/unit/net/sourceforge/jnlp/splashscreen/impls/defaultsplashscreen2012/BasePainterTest.java b/tests/netx/unit/net/sourceforge/jnlp/splashscreen/impls/defaultsplashscreen2012/BasePainterTest.java index 53d499a..ec4b97a 100644 --- a/tests/netx/unit/net/sourceforge/jnlp/splashscreen/impls/defaultsplashscreen2012/BasePainterTest.java +++ b/tests/netx/unit/net/sourceforge/jnlp/splashscreen/impls/defaultsplashscreen2012/BasePainterTest.java @@ -105,4 +105,22 @@ public class BasePainterTest { } + + @Test + public void stripCommitFromVersion() { + Assert.assertEquals("1.4", BasePainter.stripCommitFromVersion("1.4")); + Assert.assertEquals("1.4.2", BasePainter.stripCommitFromVersion("1.4.2")); + Assert.assertEquals("1.4pre", BasePainter.stripCommitFromVersion("1.4pre")); + Assert.assertEquals("1.4", BasePainter.stripCommitFromVersion("1.4+657tgkhyu4iy5")); + Assert.assertEquals("1.4.2", BasePainter.stripCommitFromVersion("1.4.2+887tgjh07tftvhjj")); + Assert.assertEquals("1.4pre+0977tyugg", BasePainter.stripCommitFromVersion("1.4pre+0977tyugg")); + + Assert.assertEquals("1.4pre+", BasePainter.stripCommitFromVersion("1.4pre+")); + Assert.assertEquals("1.4pre+foo+", BasePainter.stripCommitFromVersion("1.4pre+foo+")); + Assert.assertEquals("1.4pre+foo+bar", BasePainter.stripCommitFromVersion("1.4pre+foo+bar")); + + Assert.assertEquals("1.4", BasePainter.stripCommitFromVersion("1.4+")); + Assert.assertEquals("1.4", BasePainter.stripCommitFromVersion("1.4+foo+")); + Assert.assertEquals("1.4", BasePainter.stripCommitFromVersion("1.4+foo+bar")); + } } |