@@ -22,9 +22,9 @@ public void CanGetMinimumCompiledInFeatures()
2222 public void CanRetrieveValidVersionString ( )
2323 {
2424 // Version string format is:
25- // Major.Minor.Patch[-previewTag]+g {LibGit2Sharp_abbrev_hash}.libgit2-{libgit2_abbrev_hash} (x86|x64 - features)
25+ // Major.Minor.Patch[-previewTag]+{LibGit2Sharp_abbrev_hash}.libgit2-{libgit2_abbrev_hash} (x86|x64 - features)
2626 // Example output:
27- // "0.25.0-preview.52+g871d13a67f .libgit2-15e1193 (x86 - Threads, Https)"
27+ // "0.25.0-preview.52+871d13a67f .libgit2-15e1193 (x86 - Threads, Https)"
2828
2929 string versionInfo = GlobalSettings . Version . ToString ( ) ;
3030
@@ -33,14 +33,14 @@ public void CanRetrieveValidVersionString()
3333 // git2SharpHash: '871d13a67f' LibGit2Sharp hash.
3434 // arch: 'x86' or 'x64' libgit2 target.
3535 // git2Features: 'Threads, Ssh' libgit2 features compiled with.
36- string regex = @"^(?<version>\d+\.\d+\.\d+(-[\w\-\.]+)?\+(g (?<git2SharpHash>[a-f0-9]{10})\.)?libgit2-[a-f0-9]{7}) \((?<arch>\w+) - (?<git2Features>(?:\w*(?:, )*\w+)*)\)$" ;
36+ string regex = @"^(?<version>\d+\.\d+\.\d+(-[\w\-\.]+)?\+((?<git2SharpHash>[a-f0-9]{10})\.)?libgit2-[a-f0-9]{7}) \((?<arch>\w+) - (?<git2Features>(?:\w*(?:, )*\w+)*)\)$" ;
3737
3838 Assert . NotNull ( versionInfo ) ;
3939
4040 Match regexResult = Regex . Match ( versionInfo , regex ) ;
4141
4242 Assert . True ( regexResult . Success , "The following version string format is enforced:" +
43- "Major.Minor.Patch[-previewTag]+g {LibGit2Sharp_abbrev_hash}.libgit2-{libgit2_abbrev_hash} (x86|x64 - features). " +
43+ "Major.Minor.Patch[-previewTag]+{LibGit2Sharp_abbrev_hash}.libgit2-{libgit2_abbrev_hash} (x86|x64 - features). " +
4444 "But found \" " + versionInfo + "\" instead." ) ;
4545 }
4646
0 commit comments