@@ -22,9 +22,9 @@ public void CanGetMinimumCompiledInFeatures()
22
22
public void CanRetrieveValidVersionString ( )
23
23
{
24
24
// 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)
26
26
// 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)"
28
28
29
29
string versionInfo = GlobalSettings . Version . ToString ( ) ;
30
30
@@ -33,14 +33,14 @@ public void CanRetrieveValidVersionString()
33
33
// git2SharpHash: '871d13a67f' LibGit2Sharp hash.
34
34
// arch: 'x86' or 'x64' libgit2 target.
35
35
// 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+)*)\)$" ;
37
37
38
38
Assert . NotNull ( versionInfo ) ;
39
39
40
40
Match regexResult = Regex . Match ( versionInfo , regex ) ;
41
41
42
42
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). " +
44
44
"But found \" " + versionInfo + "\" instead." ) ;
45
45
}
46
46
0 commit comments