stabilizaiton work - projects rework for maintenanceability and ui livening

This commit is contained in:
master
2026-02-03 23:40:04 +02:00
parent 074ce117ba
commit 557feefdc3
3305 changed files with 186813 additions and 107843 deletions

View File

@@ -0,0 +1,37 @@
using Xunit;
namespace StellaOps.VersionComparison.Tests;
public partial class RpmVersionComparerTests
{
public static TheoryData<string, string, int> RpmComparisonCases => new()
{
// Epoch precedence
{ "0:1.0-1", "1:0.1-1", -1 },
{ "1:1.0-1", "0:9.9-9", 1 },
{ "1.0-1", "0:1.0-1", 0 }, // Missing epoch = 0
{ "2:1.0-1", "1:9.9-9", 1 },
// Numeric version ordering
{ "1.9-1", "1.10-1", -1 },
{ "1.02-1", "1.2-1", 0 }, // Leading zeros ignored
{ "1.0-1", "1.0.1-1", -1 },
{ "2.0-1", "1.999-1", 1 },
// Tilde pre-releases
{ "1.0~rc1-1", "1.0-1", -1 }, // Tilde sorts before release
{ "1.0~alpha-1", "1.0~beta-1", -1 },
{ "1.0~-1", "1.0-1", -1 },
{ "1.0~~-1", "1.0~-1", -1 }, // Double tilde < single
// Release qualifiers (RHEL backports)
{ "1.0-1.el8", "1.0-1.el8_5", -1 }, // Base < security update
{ "1.0-1.el8_5", "1.0-1.el8_5.1", -1 },
{ "1.0-1.el8", "1.0-1.el9", -1 }, // el8 < el9
{ "1.0-1.el9_2", "1.0-1.el9_3", -1 },
// Alpha suffix ordering (1.0a > 1.0 because "a" is additional segment)
{ "1.0a-1", "1.0-1", 1 }, // 1.0a > 1.0 (alpha suffix adds to version)
{ "1.0-1", "1.0a-1", -1 },
};
}