|
|
|
@ -26,7 +26,7 @@ func TestLinkCommand(t *testing.T) {
|
|
|
|
|
|
|
|
|
|
|
|
homedir := os.Getenv("HOME")
|
|
|
|
homedir := os.Getenv("HOME")
|
|
|
|
someconfig := filepath.Join(homedir, ".config/someconfig/")
|
|
|
|
someconfig := filepath.Join(homedir, ".config/someconfig/")
|
|
|
|
somedot := filepath.Join(homedir, ".dotfiles/someconfig/")
|
|
|
|
somedot := filepath.Join(homedir, "dotfiles/someconfig/")
|
|
|
|
|
|
|
|
|
|
|
|
expected := fmt.Sprintf("%s,%s", someconfig, somedot)
|
|
|
|
expected := fmt.Sprintf("%s,%s", someconfig, somedot)
|
|
|
|
|
|
|
|
|
|
|
|
@ -38,11 +38,11 @@ func TestLinkCommand(t *testing.T) {
|
|
|
|
func setUpTesting() {
|
|
|
|
func setUpTesting() {
|
|
|
|
fs := cmd.FileSystem
|
|
|
|
fs := cmd.FileSystem
|
|
|
|
homedir := os.Getenv("HOME")
|
|
|
|
homedir := os.Getenv("HOME")
|
|
|
|
fs.MkdirAll(filepath.Join(homedir, ".dotfiles/dotctl"), 0755)
|
|
|
|
fs.MkdirAll(filepath.Join(homedir, "dotfiles/dotctl"), 0755)
|
|
|
|
fs.Create(filepath.Join(homedir, ".dotfiles/dotctl/config"))
|
|
|
|
fs.Create(filepath.Join(homedir, "dotfiles/dotctl/config"))
|
|
|
|
fs.MkdirAll(filepath.Join(homedir, ".dotfiles/someconfig/"), 0755)
|
|
|
|
fs.MkdirAll(filepath.Join(homedir, "dotfiles/someconfig/"), 0755)
|
|
|
|
|
|
|
|
|
|
|
|
viper.Set("dotfile-path", filepath.Join(homedir, ".dotfiles"))
|
|
|
|
viper.Set("dotfile-path", filepath.Join(homedir, "dotfiles"))
|
|
|
|
viper.Set("someconfig", filepath.Join(homedir, ".config/someconfig/"))
|
|
|
|
viper.Set("someconfig", filepath.Join(homedir, ".config/someconfig/"))
|
|
|
|
viper.Set("testing", true)
|
|
|
|
viper.Set("testing", true)
|
|
|
|
|
|
|
|
|
|
|
|
|