Add a few basic test-cases for tilde in version comparison
authorPanu Matilainen <pmatilai@redhat.com>
Mon, 23 Apr 2012 08:16:04 +0000 (11:16 +0300)
committerPanu Matilainen <pmatilai@redhat.com>
Mon, 23 Apr 2012 08:16:04 +0000 (11:16 +0300)
tests/rpmvercmp.at

index 6e92fb7..2a25bdd 100644 (file)
@@ -90,6 +90,16 @@ RPMVERCMP(_+, _+, 0)
 RPMVERCMP(+, _, 0)
 RPMVERCMP(_, +, 0)
 
+dnl Basic testcases for tilde sorting
+RPMVERCMP(1.0~rc1, 1.0~rc1, 0)
+RPMVERCMP(1.0~rc1, 1.0, -1)
+RPMVERCMP(1.0, 1.0~rc1, 1)
+RPMVERCMP(1.0~rc1, 1.0~rc2, -1)
+RPMVERCMP(1.0~rc2, 1.0~rc1, 1)
+RPMVERCMP(1.0~rc1~git123, 1.0~rc1~git123, 0)
+RPMVERCMP(1.0~rc1~git123, 1.0~rc1, -1)
+RPMVERCMP(1.0~rc1, 1.0~rc1~git123, 1)
+
 dnl These are included here to document current, arguably buggy behaviors
 dnl for reference purposes and for easy checking against  unintended
 dnl behavior changes.