Introduce Package.ShortKey(): packages should have no conflict on that key in one list. #60

This commit is contained in:
Andrey Smirnov
2014-05-29 18:00:14 +04:00
parent dc248c5603
commit 90bba977d7
2 changed files with 12 additions and 0 deletions
+7
View File
@@ -95,6 +95,13 @@ func (s *PackageSuite) TestKey(c *C) {
c.Check(p.Key("xD"), DeepEquals, []byte("xDPi386 alien-arena-common 7.40-2"))
}
func (s *PackageSuite) TestShortKey(c *C) {
p := NewPackageFromControlFile(s.stanza)
c.Check(p.ShortKey(""), DeepEquals, []byte("Pi386 alien-arena-common 7.40-2"))
c.Check(p.ShortKey("xD"), DeepEquals, []byte("xDPi386 alien-arena-common 7.40-2"))
}
func (s *PackageSuite) TestStanza(c *C) {
p := NewPackageFromControlFile(s.stanza.Copy())
stanza := p.Stanza()