diff --git a/LibGit2Sharp.Tests/GlobalSettingsFixture.cs b/LibGit2Sharp.Tests/GlobalSettingsFixture.cs index e067fd192bbcc4549cb80b59619ead6732e26041..cd237663e74bbab29fe5a041b435fb3f40785a8c 100644 --- a/LibGit2Sharp.Tests/GlobalSettingsFixture.cs +++ b/LibGit2Sharp.Tests/GlobalSettingsFixture.cs @@ -23,25 +23,25 @@ public void CanGetMinimumCompiledInFeatures() public void CanRetrieveValidVersionString() { // Version string format is: - // Major.Minor.Patch[-previewTag]+{LibGit2Sharp_abbrev_hash}.libgit2-{libgit2_abbrev_hash} (x86|x64 - features) + // Major.Minor.Patch[-previewTag]+libgit2-{libgit2_abbrev_hash}.{LibGit2Sharp_hash} (arch - features) // Example output: - // "0.25.0-preview.52+871d13a67f.libgit2-15e1193 (x86 - Threads, Https)" + // "0.27.0-preview.0.1896+libgit2-c058aa8.c1ac3ed74487da5fac24cf1e48dc8ea71e917b75 (x64 - Threads, Https, NSec)" string versionInfo = GlobalSettings.Version.ToString(); // The GlobalSettings.Version returned string should contain : // version: '0.25.0[-previewTag]' LibGit2Sharp version number. - // git2SharpHash: '871d13a67f' LibGit2Sharp hash. + // git2SharpHash: 'c1ac3ed74487da5fac24cf1e48dc8ea71e917b75' LibGit2Sharp hash. // arch: 'x86' or 'x64' libgit2 target. // git2Features: 'Threads, Ssh' libgit2 features compiled with. - string regex = @"^(?\d+\.\d+\.\d+(-[\w\-\.]+)?\+((?[a-f0-9]{10})\.)?libgit2-[a-f0-9]{7}) \((?\w+) - (?(?:\w*(?:, )*\w+)*)\)$"; + string regex = @"^(?\d+\.\d+\.\d+(-[\w\-\.]+)?)\+libgit2-[a-f0-9]{7}\.((?[a-f0-9]{40}))? \((?\w+) - (?(?:\w*(?:, )*\w+)*)\)$"; Assert.NotNull(versionInfo); Match regexResult = Regex.Match(versionInfo, regex); Assert.True(regexResult.Success, "The following version string format is enforced:" + - "Major.Minor.Patch[-previewTag]+{LibGit2Sharp_abbrev_hash}.libgit2-{libgit2_abbrev_hash} (x86|x64 - features). " + + "Major.Minor.Patch[-previewTag]+libgit2-{libgit2_abbrev_hash}.{LibGit2Sharp_hash} (arch - features). " + "But found \"" + versionInfo + "\" instead."); }