Index: tools/release/test_scripts.py |
diff --git a/tools/release/test_scripts.py b/tools/release/test_scripts.py |
index 8fbdc6903d5c7d73e6be1e7190d37e56f8c16027..825c191d4e2fc8adaf9529a08e57b25f22603318 100644 |
--- a/tools/release/test_scripts.py |
+++ b/tools/release/test_scripts.py |
@@ -74,6 +74,30 @@ AUTO_PUSH_ARGS = [ |
class ToplevelTest(unittest.TestCase): |
+ def testSaniniziteVersionTags(self): |
+ self.assertEquals("4.8.230", SanitizeVersionTag("4.8.230")) |
+ self.assertEquals("4.8.230", SanitizeVersionTag("tags/4.8.230")) |
+ self.assertEquals(None, SanitizeVersionTag("candidate")) |
+ |
+ def testNormalizeVersionTags(self): |
+ input = ["4.8.230", |
+ "tags/4.8.230", |
+ "tags/4.8.224.1", |
+ "4.8.224.1", |
+ "4.8.223.1", |
+ "tags/4.8.223", |
+ "tags/4.8.231", |
+ "candidates"] |
+ expected = ["4.8.230", |
+ "4.8.230", |
+ "4.8.224.1", |
+ "4.8.224.1", |
+ "4.8.223.1", |
+ "4.8.223", |
+ "4.8.231", |
+ ] |
+ self.assertEquals(expected, NormalizeVersionTags(input)) |
+ |
def testSortBranches(self): |
S = releases.SortBranches |
self.assertEquals(["3.1", "2.25"], S(["2.25", "3.1"])[0:2]) |