mirror of
https://github.com/aptly-dev/aptly.git
synced 2026-05-06 22:18:28 +00:00
Style fixes.
This commit is contained in:
Vendored
+8
-8
@@ -14,18 +14,18 @@ type DebSuite struct {
|
||||
var _ = Suite(&DebSuite{})
|
||||
|
||||
func (s *DebSuite) SetUpSuite(c *C) {
|
||||
_, __file__, _, _ := runtime.Caller(0)
|
||||
s.debFile = filepath.Join(filepath.Dir(__file__), "../system/files/libboost-program-options-dev_1.49.0.1_i386.deb")
|
||||
s.dscFile = filepath.Join(filepath.Dir(__file__), "../system/files/pyspi_0.6.1-1.3.dsc")
|
||||
s.dscFileNoSign = filepath.Join(filepath.Dir(__file__), "../system/files/pyspi-0.6.1-1.3.stripped.dsc")
|
||||
_, _File, _, _ := runtime.Caller(0)
|
||||
s.debFile = filepath.Join(filepath.Dir(_File), "../system/files/libboost-program-options-dev_1.49.0.1_i386.deb")
|
||||
s.dscFile = filepath.Join(filepath.Dir(_File), "../system/files/pyspi_0.6.1-1.3.dsc")
|
||||
s.dscFileNoSign = filepath.Join(filepath.Dir(_File), "../system/files/pyspi-0.6.1-1.3.stripped.dsc")
|
||||
}
|
||||
|
||||
func (s *DebSuite) TestGetControlFileFromDeb(c *C) {
|
||||
_, err := GetControlFileFromDeb("/no/such/file")
|
||||
c.Check(err, ErrorMatches, ".*no such file or directory")
|
||||
|
||||
_, __file__, _, _ := runtime.Caller(0)
|
||||
_, err = GetControlFileFromDeb(__file__)
|
||||
_, _File, _, _ := runtime.Caller(0)
|
||||
_, err = GetControlFileFromDeb(_File)
|
||||
c.Check(err, ErrorMatches, "unable to read .deb archive: ar: missing global header")
|
||||
|
||||
st, err := GetControlFileFromDeb(s.debFile)
|
||||
@@ -40,8 +40,8 @@ func (s *DebSuite) TestGetControlFileFromDsc(c *C) {
|
||||
_, err := GetControlFileFromDsc("/no/such/file", verifier)
|
||||
c.Check(err, ErrorMatches, ".*no such file or directory")
|
||||
|
||||
_, __file__, _, _ := runtime.Caller(0)
|
||||
_, err = GetControlFileFromDsc(__file__, verifier)
|
||||
_, _File, _, _ := runtime.Caller(0)
|
||||
_, err = GetControlFileFromDsc(_File, verifier)
|
||||
c.Check(err, ErrorMatches, "malformed stanza syntax")
|
||||
|
||||
st, err := GetControlFileFromDsc(s.dscFile, verifier)
|
||||
|
||||
Reference in New Issue
Block a user