Skip to content

Commit

Permalink
Merge pull request #553 from pjf/version_tests
Browse files Browse the repository at this point in the history
Tests: Allow for -PRE in stable release numbers.
  • Loading branch information
RichardLake committed Dec 11, 2014
2 parents 01dc95b + cd35e0d commit b9c866a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions CKAN/Tests/CKAN/Meta.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,11 @@ public void ReleaseNumber()
}

// We should always be in the form v0.xx (pre-release series),
// or vx.x.x (released). We also permit a (-RC\d) extension for
// release candidates.
// or vx.x.x (released). We also permit a (-RC\d+) extension for
// release candidates, and -PRE\d for pre-releases.

Assert.IsTrue(
Regex.IsMatch(version.ToString(), @"^v(?:0.\d+|\d+\.\d+\.\d+(?:-RC\d+)?)$"),
Regex.IsMatch(version.ToString(), @"^v(?:0.\d+|\d+\.\d+\.\d+(?:-(?:RC|PRE)\d+)?)$"),
version.ToString());
}
}
Expand Down

0 comments on commit b9c866a

Please sign in to comment.