From 73bad649ab9b572da60d4f0c07ef43195162c07f Mon Sep 17 00:00:00 2001 From: Martin Czygan Date: Thu, 1 Jul 2021 00:57:18 +0200 Subject: zippy: update test --- skate/zippy_test.go | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) 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) -- cgit v1.2.3