@@ -40,6 +40,12 @@ final class SemanticVersionTests: XCTestCase {
4040 XCTAssertNotNil ( " 1.0.0 " . wholeMatch ( of: semVerRegex) )
4141 XCTAssertNotNil ( " 2.0.0 " . wholeMatch ( of: semVerRegex) )
4242 XCTAssertNotNil ( " 1.1.7 " . wholeMatch ( of: semVerRegex) )
43+ XCTAssertNotNil ( " 01.1.1 " . wholeMatch ( of: semVerRegex) )
44+ XCTAssertNotNil ( " 1.01.1 " . wholeMatch ( of: semVerRegex) )
45+ XCTAssertNotNil ( " 1.1.01 " . wholeMatch ( of: semVerRegex) )
46+ XCTAssertNotNil ( " 001.1.1 " . wholeMatch ( of: semVerRegex) )
47+ XCTAssertNotNil ( " 1.001.1 " . wholeMatch ( of: semVerRegex) )
48+ XCTAssertNotNil ( " 1.1.001 " . wholeMatch ( of: semVerRegex) )
4349 XCTAssertNotNil ( " 2.0.0+build.1848 " . wholeMatch ( of: semVerRegex) )
4450 XCTAssertNotNil ( " 2.0.1-alpha.1227 " . wholeMatch ( of: semVerRegex) )
4551 XCTAssertNotNil ( " 1.0.0-alpha+beta " . wholeMatch ( of: semVerRegex) )
@@ -83,9 +89,6 @@ final class SemanticVersionTests: XCTestCase {
8389 XCTAssertNil ( " 1.0.0-alpha.....1 " . wholeMatch ( of: semVerRegex) )
8490 XCTAssertNil ( " 1.0.0-alpha......1 " . wholeMatch ( of: semVerRegex) )
8591 XCTAssertNil ( " 1.0.0-alpha.......1 " . wholeMatch ( of: semVerRegex) )
86- XCTAssertNil ( " 01.1.1 " . wholeMatch ( of: semVerRegex) )
87- XCTAssertNil ( " 1.01.1 " . wholeMatch ( of: semVerRegex) )
88- XCTAssertNil ( " 1.1.01 " . wholeMatch ( of: semVerRegex) )
8992 XCTAssertNil ( " 1.2 " . wholeMatch ( of: semVerRegex) )
9093 XCTAssertNil ( " 1.2.3.DEV " . wholeMatch ( of: semVerRegex) )
9194 XCTAssertNil ( " 1.2-SNAPSHOT " . wholeMatch ( of: semVerRegex) )
@@ -110,6 +113,8 @@ final class SemanticVersionTests: XCTestCase {
110113 XCTAssertEqual ( SemanticVersion ( " 1.2 " ) , nil )
111114 XCTAssertEqual ( SemanticVersion ( " 1.2.3rc " ) , nil )
112115 XCTAssertEqual ( SemanticVersion ( " swift-2.2-SNAPSHOT-2016-01-11-a " ) , nil )
116+ XCTAssertEqual ( SemanticVersion ( " 01.02.03 " ) , SemanticVersion ( 1 , 2 , 3 ) )
117+ XCTAssertEqual ( SemanticVersion ( " 001.002.003 " ) , SemanticVersion ( 1 , 2 , 3 ) )
113118 }
114119
115120 func test_description( ) throws {
0 commit comments