Skip to content

Commit fe783a3

Browse files
committed
Fixed broken POSIX tests.
1 parent c647591 commit fe783a3

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

lib/example_posix_test.go

+4-4
Original file line numberDiff line numberDiff line change
@@ -8,23 +8,23 @@ import (
88
"log"
99
)
1010

11-
func ExampleConfig_Clean() {
11+
func ExampleConfig_clean() {
1212
c := Config{
1313
Save: "..//test///.",
1414
}
15-
if err := c.Clean(); err != nil {
15+
if err := c.clean(); err != nil {
1616
log.Fatalln(err)
1717
}
1818
fmt.Print(c.Save)
1919
// Output: ../test
2020
}
2121

22-
func ExampleConfig_Walk() {
22+
func ExampleConfig_WalkDir() {
2323
c := Config{
2424
Print: true,
2525
Dupes: true,
2626
}
27-
if err := c.Walk("../test"); err != nil {
27+
if err := c.WalkDir("../test"); err != nil {
2828
log.Panicln(err)
2929
}
3030
// Output:

lib/zipcmt.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ func (c *Config) WalkDir(root string) error {
128128
return nil
129129
}
130130
c.zips++
131-
if !c.Print && !c.Quiet {
131+
if !c.test && !c.Print && !c.Quiet {
132132
fmt.Print("\r", color.Secondary.Sprint("Scanned "), color.Primary.Sprintf("%d zip archives", c.zips))
133133
}
134134
// read zip file comment
@@ -280,7 +280,7 @@ func (c Config) Status() string {
280280
unq = "unique "
281281
}
282282
s := "\n"
283-
if !c.Print {
283+
if !c.test && !c.Print {
284284
s = "\r"
285285
}
286286
s += color.Secondary.Sprint("Scanned ") +
@@ -293,7 +293,7 @@ func (c Config) Status() string {
293293
color.Primary.Sprintf("%d %s%s", c.cmmts, unq, cm)
294294
if !c.test {
295295
s += color.Secondary.Sprint(", taking ") +
296-
color.Primary.Sprintf("%s", time.Since(c.Timer))
296+
color.Primary.Sprintf("%s", time.Since(c.Timer)) + "\n"
297297
}
298298
return s
299299
}

0 commit comments

Comments
 (0)