mirror of
https://github.com/peco/peco.git
synced 2026-09-10 07:16:29 -04:00
go fmt
This commit is contained in:
parent
1cf021c6db
commit
63aabf3cbd
|
|
@ -2,11 +2,11 @@ package peco
|
|||
|
||||
import (
|
||||
"encoding/json"
|
||||
"path/filepath"
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"os"
|
||||
"os/user"
|
||||
"path/filepath"
|
||||
"strings"
|
||||
"testing"
|
||||
|
||||
|
|
@ -80,18 +80,18 @@ func TestLocateRcfile(t *testing.T) {
|
|||
}
|
||||
|
||||
expected := []string{
|
||||
filepath.Join(dir, "peco"),
|
||||
filepath.Join(dir, "1", "peco"),
|
||||
filepath.Join(dir, "2", "peco"),
|
||||
filepath.Join(dir, "3", "peco"),
|
||||
filepath.Join(dir, ".peco"),
|
||||
filepath.Join(dir, "peco"),
|
||||
filepath.Join(dir, "1", "peco"),
|
||||
filepath.Join(dir, "2", "peco"),
|
||||
filepath.Join(dir, "3", "peco"),
|
||||
filepath.Join(dir, ".peco"),
|
||||
}
|
||||
|
||||
i := 0
|
||||
_locateRcfileIn = func(dir string) (string, error) {
|
||||
t.Logf("looking for file in %s", dir)
|
||||
if i > len(expected) - 1 {
|
||||
t.Fatalf("Got %d directories, only have %d", i + 1, len(expected))
|
||||
if i > len(expected)-1 {
|
||||
t.Fatalf("Got %d directories, only have %d", i+1, len(expected))
|
||||
}
|
||||
|
||||
if expected[i] != dir {
|
||||
|
|
@ -117,5 +117,4 @@ func TestLocateRcfile(t *testing.T) {
|
|||
i = 0
|
||||
LocateRcfile()
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -39,9 +39,9 @@ func TestKeymapStrToKeyValue(t *testing.T) {
|
|||
|
||||
func TestKeymapStrToKeyValueWithAlt(t *testing.T) {
|
||||
expected := map[string]termbox.Key{
|
||||
"M-v": termbox.Key('v'),
|
||||
"M-C-v": termbox.KeyCtrlV,
|
||||
"M-Space": termbox.KeySpace,
|
||||
"M-v": termbox.Key('v'),
|
||||
"M-C-v": termbox.KeyCtrlV,
|
||||
"M-Space": termbox.KeySpace,
|
||||
"M-MouseLeft": termbox.MouseLeft,
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue