Watch 6 Star 6 Fork 2

ShirDon-廖显东 / uiprogressGoMIT

Join us
Explore and code with more than 2 million developers,Free private repositories !:)
Sign up
uiprogress是用于实时更新终端输出的go库 spread retract

https://gitee.com/shirdonl/uiprogress.git

Clone or download
writer_test.go 355 Bytes
Copy Edit Web IDE Raw Blame History
ShirDon-廖显东 authored 2019-12-01 20:12 . git commit
package uiprogress
import (
"bytes"
"fmt"
"testing"
)
func TestWriter(t *testing.T) {
w := New()
b := &bytes.Buffer{}
w.Out = b
w.Start()
for i := 0; i < 2; i++ {
_, _ = fmt.Fprintln(w, "foo")
}
w.Stop()
_, _ = fmt.Fprintln(b, "bar")
want := "foo\nfoo\nbar\n"
if b.String() != want {
t.Fatalf("want %q, got %q", want, b.String())
}
}
Go
1
https://gitee.com/shirdonl/uiprogress.git
git@gitee.com:shirdonl/uiprogress.git
shirdonl
uiprogress
uiprogress
master

Help Search