mirror of
https://github.com/peco/peco.git
synced 2026-09-10 07:16:29 -04:00
Because I love @mattn
This commit is contained in:
parent
3daa824e8e
commit
3b2b1fe07a
10
hub_test.go
10
hub_test.go
|
|
@ -13,7 +13,7 @@ func TestHub(t *testing.T) {
|
|||
go func() {
|
||||
hr := <-h.QueryCh()
|
||||
time.Sleep(100 * time.Millisecond)
|
||||
done["query"]= time.Now()
|
||||
done["query"] = time.Now()
|
||||
hr.Done()
|
||||
}()
|
||||
go func() {
|
||||
|
|
@ -22,7 +22,7 @@ func TestHub(t *testing.T) {
|
|||
t.Errorf("Expected data to be nil, got %s", hr.DataInterface())
|
||||
}
|
||||
time.Sleep(100 * time.Millisecond)
|
||||
done["draw"]= time.Now()
|
||||
done["draw"] = time.Now()
|
||||
hr.Done()
|
||||
}()
|
||||
go func() {
|
||||
|
|
@ -37,13 +37,13 @@ func TestHub(t *testing.T) {
|
|||
go func() {
|
||||
hr := <-h.ClearStatusCh()
|
||||
time.Sleep(100 * time.Millisecond)
|
||||
done["clearStatus"]= time.Now()
|
||||
done["clearStatus"] = time.Now()
|
||||
hr.Done()
|
||||
}()
|
||||
go func() {
|
||||
hr := <-h.PagingCh()
|
||||
time.Sleep(100 * time.Millisecond)
|
||||
done["paging"]= time.Now()
|
||||
done["paging"] = time.Now()
|
||||
hr.Done()
|
||||
}()
|
||||
|
||||
|
|
@ -84,4 +84,4 @@ func TestHub(t *testing.T) {
|
|||
if ok {
|
||||
t.Errorf("LoopCh should be closed, but it is not")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -123,4 +123,4 @@ func TestStatusBar(t *testing.T) {
|
|||
// need to think of a way to verify that we're actually doing something
|
||||
st.ClearStatus(500 * time.Millisecond)
|
||||
<-time.After(time.Second)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@ func TestNewMatch(t *testing.T) {
|
|||
}
|
||||
|
||||
makeDidMatch := func(buf string) (string, Match) {
|
||||
return buf, NewDidMatch(buf, true, [][]int{{0,5}})
|
||||
return buf, NewDidMatch(buf, true, [][]int{{0, 5}})
|
||||
}
|
||||
|
||||
makeNoMatch := func(buf string) (string, Match) {
|
||||
|
|
|
|||
|
|
@ -33,4 +33,4 @@ func (i *interceptor) record(name string, args []interface{}) {
|
|||
}
|
||||
|
||||
events[name] = append(v, interceptorArgs(args))
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -38,4 +38,4 @@ func TestReader(t *testing.T) {
|
|||
if len(ctx.lines) != 3 {
|
||||
t.Errorf("Expected 3 lines from input, only got %d", len(ctx.lines))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue