Codebase list golang-github-vbauerster-mpb / 704d634
remove wrong test Vladimir Bauer 4 years ago
1 changed file(s) with 0 addition(s) and 28 deletion(s). Raw diff Collapse all Expand all
8383
8484 if !strings.Contains(got, wantBar) {
8585 t.Errorf("Want bar: %q, got bar: %q\n", wantBar, got)
86 }
87 }
88
89 func TestBarHas100PercentWithOnCompleteDecorator(t *testing.T) {
90 var buf bytes.Buffer
91
92 p := mpb.New(mpb.WithWidth(80), mpb.WithOutput(&buf))
93
94 total := 50
95
96 bar := p.AddBar(int64(total),
97 mpb.AppendDecorators(
98 decor.OnComplete(
99 decor.Percentage(), "done",
100 ),
101 ),
102 )
103
104 for i := 0; i < total; i++ {
105 bar.Increment()
106 time.Sleep(10 * time.Millisecond)
107 }
108
109 p.Wait()
110
111 hundred := "100 %"
112 if !bytes.Contains(buf.Bytes(), []byte(hundred)) {
113 t.Errorf("Bar's buffer does not contain: %q\n", hundred)
11486 }
11587 }
11688