mirror of
https://github.com/sigmasternchen/xtext-core
synced 2025-03-15 16:28:56 +00:00
Merge pull request #1657 from eclipse/kt_XtextVersionTests_BetaVersion
Consider Beta release pattern in version string
This commit is contained in:
commit
f8d47d647e
1 changed files with 2 additions and 1 deletions
|
@ -18,7 +18,7 @@ import org.junit.Test;
|
|||
* @author dhuebner - Initial contribution and API
|
||||
*/
|
||||
public class XtextVersionTests {
|
||||
private static Pattern VERSION_MATCHER = Pattern.compile("\\d\\.\\d+\\.\\d+(?:(-SNAPSHOT)|(\\.M\\d))?");
|
||||
private static Pattern VERSION_MATCHER = Pattern.compile("\\d\\.\\d+\\.\\d+(?:(-SNAPSHOT)|(\\.M\\d)|(\\.Beta\\d?))?");
|
||||
|
||||
@Test
|
||||
public void testVersionKinds() {
|
||||
|
@ -58,6 +58,7 @@ public class XtextVersionTests {
|
|||
assertTrue("2.20.0 did not match", VERSION_MATCHER.matcher("2.20.0").matches());
|
||||
assertTrue("2.20.0-SNAPSHOT did not match", VERSION_MATCHER.matcher("2.20.0-SNAPSHOT").matches());
|
||||
assertTrue("2.20.0.M1 did not match", VERSION_MATCHER.matcher("2.20.0.M1").matches());
|
||||
assertTrue("2.20.0.Beta did not match", VERSION_MATCHER.matcher("2.20.0.Beta").matches());
|
||||
|
||||
assertFalse(VERSION_MATCHER.matcher("2.20.0.qualifier").matches());
|
||||
assertFalse(VERSION_MATCHER.matcher("2.20.0.vSomething").matches());
|
||||
|
|
Loading…
Reference in a new issue