move pkgname out of progress interface and move it into "Start()"

This commit is contained in:
Michael Vogt
2015-05-06 14:26:38 +02:00
parent 3cd55d0d6b
commit dde55f9835
11 changed files with 24 additions and 25 deletions
+6 -6
View File
@@ -48,7 +48,7 @@ func (ts *ProgressTestSuite) TestSpin(c *C) {
oldStdout := os.Stdout
os.Stdout = f
t := NewTextProgress("no-pkg")
t := NewTextProgress()
for i := 0; i < 6; i++ {
t.Spin("m")
}
@@ -89,7 +89,7 @@ func (ts *ProgressTestSuite) testAgreed(answer string, value bool, c *C) {
license := "Void where empty."
t := NewTextProgress("no-pkg")
t := NewTextProgress()
c.Check(t.Agreed("blah blah", license), Equals, value)
_, err = fout.Seek(0, 0)
@@ -115,7 +115,7 @@ func (ts *ProgressTestSuite) TestNotify(c *C) {
fout.Close()
}()
t := NewTextProgress("no-pkg")
t := NewTextProgress()
t.Notify("blah blah")
_, err = fout.Seek(0, 0)
@@ -137,12 +137,12 @@ func (ts *ProgressTestSuite) TestMakeProgressBar(c *C) {
ts.attachedToTerminalReturn = true
pbar = MakeProgressBar("foo")
c.Assert(pbar, FitsTypeOf, NewTextProgress("foo"))
pbar = MakeProgressBar()
c.Assert(pbar, FitsTypeOf, NewTextProgress())
ts.attachedToTerminalReturn = false
pbar = MakeProgressBar("bar")
pbar = MakeProgressBar()
c.Assert(pbar, FitsTypeOf, &NullProgress{})
}