Fixed: Properly parse mono version 3.10

pull/6/head
Mark McDowall 10 years ago
parent b3f086fe93
commit 21c5352183

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

@ -11,7 +11,7 @@ namespace NzbDrone.Core.HealthCheck.Checks
{
private readonly IRuntimeInfo _runtimeInfo;
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)
{

Loading…
Cancel
Save