9 "github.com/stretchr/testify/require"
13 os.Setenv("XDG_CONFIG_HOME", "/tmp/fakeconfig")
14 os.Setenv("XDG_DATA_HOME", "/tmp/fakedata")
17func TestDirs(t *testing.T) {
21 dirsCmd.SetIn(bytes.NewReader(nil))
22 dirsCmd.Run(dirsCmd, nil)
23 expected := filepath.FromSlash("/tmp/fakeconfig/crush") + "\n" +
24 filepath.FromSlash("/tmp/fakedata/crush") + "\n"
25 require.Equal(t, expected, b.String())
28func TestConfigDir(t *testing.T) {
30 configDirCmd.SetOut(&b)
31 configDirCmd.SetErr(&b)
32 configDirCmd.SetIn(bytes.NewReader(nil))
33 configDirCmd.Run(configDirCmd, nil)
34 expected := filepath.FromSlash("/tmp/fakeconfig/crush") + "\n"
35 require.Equal(t, expected, b.String())
38func TestDataDir(t *testing.T) {
42 dataDirCmd.SetIn(bytes.NewReader(nil))
43 dataDirCmd.Run(dataDirCmd, nil)
44 expected := filepath.FromSlash("/tmp/fakedata/crush") + "\n"
45 require.Equal(t, expected, b.String())
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list