Handle corner-case: null reflist.

This commit is contained in:
Andrey Smirnov
2014-02-24 12:17:24 +04:00
parent 97becf199f
commit 1b64612aef
2 changed files with 9 additions and 0 deletions
+4
View File
@@ -287,6 +287,10 @@ func (s *PackageListSuite) TestNewPackageListFromRefList(c *C) {
c.Assert(err, IsNil)
c.Check(list.Len(), Equals, 4)
c.Check(list.Add(s.p4), ErrorMatches, "conflict in package.*")
list, err = NewPackageListFromRefList(nil, coll)
c.Assert(err, IsNil)
c.Check(list.Len(), Equals, 0)
}
func (s *PackageListSuite) TestNewPackageRefList(c *C) {