v0.314.0: a restore puts the setup gate back as it was (R-1057); a test build moves with the floor (R-1053); Prowlarr links itself (R-1058); the box claims Plex by address (R-1060)
gates / gates (push) Successful in 47s
gates / gates (push) Successful in 47s
MinAgent 0.155.0 (unchanged). Tests red-proved by mutation (A: 10, B: 7, C: 1, C2: 2). Claude-Session: https://claude.ai/code/session_0159rPz1ZhFKsS53msqPYxtS
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
package util
|
||||
|
||||
import "testing"
|
||||
|
||||
// R-1053 (v0.314.0): a test build orders BELOW its release, so the floor moves a box off it; ParseVersion itself still
|
||||
// refuses a suffix, so nothing that lists or offers tags ever sees a test build.
|
||||
// COMPANION RED-PROOF: make comparePre return 0 → „0.313.0-rc.4 < 0.313.0" fails.
|
||||
func TestR1053_PreReleaseOrdersBelowItsRelease(t *testing.T) {
|
||||
order := []string{"0.312.9", "0.313.0-rc.1", "0.313.0-rc.4", "0.313.0-rc.10", "0.313.0", "0.313.1-rc.1", "0.313.1"}
|
||||
for i := 0; i+1 < len(order); i++ {
|
||||
a, err := ParseVersionPre(order[i])
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
b, err := ParseVersionPre(order[i+1])
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
if a.Compare(b) >= 0 || b.Compare(a) <= 0 {
|
||||
t.Errorf("%s must be below %s", order[i], order[i+1])
|
||||
}
|
||||
}
|
||||
v, err := ParseVersionPre("v0.313.0-rc.4+build7")
|
||||
if err != nil || v.Pre != "rc.4" || v.String() != "0.313.0-rc.4" {
|
||||
t.Fatalf("got %+v %v", v, err)
|
||||
}
|
||||
for _, bad := range []string{"0.313.0-", "0.313.0-rc..4", "0.313.0-r c", "dev", "0.313"} {
|
||||
if _, err := ParseVersionPre(bad); err == nil {
|
||||
t.Errorf("%q must be refused", bad)
|
||||
}
|
||||
}
|
||||
if _, err := ParseVersion("0.313.0-rc.4"); err == nil {
|
||||
t.Fatal("ParseVersion must still refuse a test build (it picks the tags the household is offered)")
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user