This commit is contained in:
Araq 2018-08-27 11:47:57 +02:00
commit 3999e3be5f

View file

@ -140,18 +140,19 @@ when isMainModule:
doAssert v"#aaaqwe" < v"1.1" # We cannot assume that a branch is newer. doAssert v"#aaaqwe" < v"1.1" # We cannot assume that a branch is newer.
doAssert v"#a111" < v"#head" doAssert v"#a111" < v"#head"
let conf = newConfigRef()
var rr = newStringTable() var rr = newStringTable()
addPackage rr, "irc-#a111" addPackage conf, rr, "irc-#a111", unknownLineInfo()
addPackage rr, "irc-#head" addPackage conf, rr, "irc-#head", unknownLineInfo()
addPackage rr, "irc-0.1.0" addPackage conf, rr, "irc-0.1.0", unknownLineInfo()
addPackage rr, "irc" #addPackage conf, rr, "irc", unknownLineInfo()
addPackage rr, "another" #addPackage conf, rr, "another", unknownLineInfo()
addPackage rr, "another-0.1" addPackage conf, rr, "another-0.1", unknownLineInfo()
addPackage rr, "ab-0.1.3" addPackage conf, rr, "ab-0.1.3", unknownLineInfo()
addPackage rr, "ab-0.1" addPackage conf, rr, "ab-0.1", unknownLineInfo()
addPackage rr, "justone" addPackage conf, rr, "justone-1.0", unknownLineInfo()
doAssert toSeq(rr.chosen) == doAssert toSeq(rr.chosen) ==
@["irc-#head", "another-0.1", "ab-0.1.3", "justone"] @["irc-#head", "another-0.1", "ab-0.1.3", "justone-1.0"]