mirror of https://github.com/hrfee/jfa-go
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
261 B
18 lines
261 B
3 years ago
|
package linecache
|
||
|
|
||
|
import (
|
||
|
"fmt"
|
||
|
"strings"
|
||
|
"testing"
|
||
|
"time"
|
||
|
)
|
||
|
|
||
|
func Test(t *testing.T) {
|
||
|
wr := NewLineCache(10)
|
||
|
for i := 10; i < 50; i++ {
|
||
|
fmt.Fprintln(wr, i)
|
||
|
fmt.Print(strings.ReplaceAll(wr.String(), "\n", " "), "\n")
|
||
|
time.Sleep(time.Second)
|
||
|
}
|
||
|
}
|