diff --git a/progress_test.go b/progress_test.go index 0afc835..01156b5 100644 --- a/progress_test.go +++ b/progress_test.go @@ -262,3 +262,17 @@ t.Errorf("Expected buf.Len == 0, got: %d\n", buf.Len()) } } + +func TestAddAfterDone(t *testing.T) { + p := mpb.New(mpb.WithOutput(io.Discard)) + bar := p.AddBar(100) + bar.IncrBy(100) + + p.Wait() + + _, err := p.Add(100, nil) + + if err != mpb.DoneError { + t.Errorf("Expected %q, got: %q\n", mpb.DoneError, err) + } +}