Fixed: Properly parse mono version 3.10

This commit is contained in:
Mark McDowall 2014-09-14 08:27:11 -07:00
parent b3f086fe93
commit 21c5352183
2 changed files with 9 additions and 1 deletions

View File

@ -85,5 +85,13 @@ namespace NzbDrone.Core.Test.HealthCheck.Checks
Subject.Check().ShouldBeOk(); Subject.Check().ShouldBeOk();
} }
[Test]
public void should_return_ok_when_mono_3_10()
{
GivenOutput("3.10");
Subject.Check().ShouldBeOk();
}
} }
} }

View File

@ -11,7 +11,7 @@ namespace NzbDrone.Core.HealthCheck.Checks
{ {
private readonly IRuntimeInfo _runtimeInfo; private readonly IRuntimeInfo _runtimeInfo;
private readonly Logger _logger; private readonly Logger _logger;
private static readonly Regex VersionRegex = new Regex(@"(?<=\W|^)(?<version>\d+\.\d+\.\d+(\.\d+)?)(?=\W)", RegexOptions.Compiled | RegexOptions.IgnoreCase); private static readonly Regex VersionRegex = new Regex(@"(?<=\W|^)(?<version>\d+\.\d+(\.\d+)?(\.\d+)?)(?=\W)", RegexOptions.Compiled | RegexOptions.IgnoreCase);
public MonoVersionCheck(IRuntimeInfo runtimeInfo, Logger logger) public MonoVersionCheck(IRuntimeInfo runtimeInfo, Logger logger)
{ {