Read a commit as the same as itself however short, and fit the pending assignments' tests to a mesh that asks no build (issue 1851, A9, A10)
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
package main
|
||||
|
||||
import "testing"
|
||||
|
||||
// A held build's commit as recorded and as registered name one commit however each is abbreviated, a short name
|
||||
// included (the fault the try of R4e's controller found: "c0" was never the same as "c0").
|
||||
func TestACommitIsTheSameAsItselfHoweverShort(t *testing.T) {
|
||||
for _, c := range []struct {
|
||||
a, b string
|
||||
same bool
|
||||
}{{"c0", "c0", true}, {"c0ffee0123456789", "c0ffee0", true}, {"c0ffee0123", "c0ffee0999", false}, {"", "", false},
|
||||
{"c0", "c1", false}} {
|
||||
if got := sameCommitID(c.a, c.b); got != c.same {
|
||||
t.Errorf("%q %q: %v", c.a, c.b, got)
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user