diff options
Diffstat (limited to 'skate')
-rw-r--r-- | skate/zippy_test.go | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/skate/zippy_test.go b/skate/zippy_test.go index 7290e94..3c1911c 100644 --- a/skate/zippy_test.go +++ b/skate/zippy_test.go @@ -279,6 +279,26 @@ func TestRemoveSelfLinks(t *testing.T) { brefs: []*BiblioRef{}, result: nil, }, + { + brefs: []*BiblioRef{ + &BiblioRef{SourceReleaseIdent: "a", TargetReleaseIdent: "a"}, + &BiblioRef{SourceReleaseIdent: "a", TargetReleaseIdent: "b"}, + }, + result: []*BiblioRef{ + &BiblioRef{SourceReleaseIdent: "a", TargetReleaseIdent: "b"}, + }, + }, + { + brefs: []*BiblioRef{ + &BiblioRef{SourceReleaseIdent: "a", TargetReleaseIdent: "a"}, + &BiblioRef{SourceReleaseIdent: "a", TargetReleaseIdent: "a"}, + &BiblioRef{SourceReleaseIdent: "a", TargetReleaseIdent: "a"}, + &BiblioRef{SourceReleaseIdent: "a", TargetReleaseIdent: "b"}, + }, + result: []*BiblioRef{ + &BiblioRef{SourceReleaseIdent: "a", TargetReleaseIdent: "b"}, + }, + }, } for i, c := range cases { result := removeSelfLinks(c.brefs) |