當前位置: 首頁>>代碼示例>>Golang>>正文


Golang doubles.TempHome函數代碼示例

本文整理匯總了Golang中github.com/caarlos0/antibody/doubles.TempHome函數的典型用法代碼示例。如果您正苦於以下問題:Golang TempHome函數的具體用法?Golang TempHome怎麽用?Golang TempHome使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。


在下文中一共展示了TempHome函數的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Golang代碼示例。

示例1: TestSourceablesDotPluginZsh

func TestSourceablesDotPluginZsh(t *testing.T) {
	home := doubles.TempHome()
	bundle := NewGitBundle("caarlos0/zsh-pg", home)
	bundle.Download()
	srcs := bundle.Sourceables()
	assert.Len(t, srcs, 1)
}
開發者ID:zhaoyao,項目名稱:dotfiles,代碼行數:7,代碼來源:git_bundle_test.go

示例2: TestPullsRepo

func TestPullsRepo(t *testing.T) {
	home := doubles.TempHome()
	bundle := NewGitBundle("caarlos0/zsh-pg", home)
	bundle.Download()
	err := bundle.Update()
	assert.NoError(t, err)
}
開發者ID:zhaoyao,項目名稱:dotfiles,代碼行數:7,代碼來源:git_bundle_test.go

示例3: TestSourceablesDotSh

func TestSourceablesDotSh(t *testing.T) {
	home := doubles.TempHome()
	bundle := NewGitBundle("rupa/z", home)
	bundle.Download()
	srcs := bundle.Sourceables()
	assert.Len(t, srcs, 1)
}
開發者ID:zhaoyao,項目名稱:dotfiles,代碼行數:7,代碼來源:git_bundle_test.go

示例4: TestClonesInvalidRepo

func TestClonesInvalidRepo(t *testing.T) {
	home := doubles.TempHome()
	err := NewGitBundle("this-doesnt-exist", home).Download()
	if err == nil {
		t.Error("Expected an error because this repo doesn't exist")
	}
}
開發者ID:b4b4r07,項目名稱:antibody,代碼行數:7,代碼來源:git_bundle_test.go

示例5: TestFailsToBundleInvalidRepos

func TestFailsToBundleInvalidRepos(t *testing.T) {
	home := doubles.TempHome()
	// TODO return an error here
	// defer expectError(t)
	bundle("csadsadp", home)
	assertBundledPlugins(t, 0, home)
}
開發者ID:b4b4r07,項目名稱:antibody,代碼行數:7,代碼來源:api_test.go

示例6: TestUpdatesBrokenRepo

func TestUpdatesBrokenRepo(t *testing.T) {
	home := doubles.TempHome()
	bundle := NewGitBundle("caarlos0/zsh-mkc", home)
	bundle.Download()
	os.RemoveAll(bundle.Folder() + "/.git")
	// TODO check amount of updated repos
	update(home)
}
開發者ID:b4b4r07,項目名稱:antibody,代碼行數:8,代碼來源:api_test.go

示例7: TestPullsRepo

func TestPullsRepo(t *testing.T) {
	home := doubles.TempHome()
	bundle := NewGitBundle("caarlos0/zsh-pg", home)
	bundle.Download()
	err := bundle.Update()
	if err != nil {
		t.Error("No errors expected")
	}
}
開發者ID:b4b4r07,項目名稱:antibody,代碼行數:9,代碼來源:git_bundle_test.go

示例8: TestSourceablesDotPluginZsh

func TestSourceablesDotPluginZsh(t *testing.T) {
	home := doubles.TempHome()
	bundle := NewGitBundle("caarlos0/zsh-pg", home)
	bundle.Download()
	srcs := bundle.Sourceables()
	if len(srcs) != 1 {
		t.Error("Expected 1 sourceable file")
	}
}
開發者ID:b4b4r07,項目名稱:antibody,代碼行數:9,代碼來源:git_bundle_test.go

示例9: TestSourceablesDotSh

func TestSourceablesDotSh(t *testing.T) {
	home := doubles.TempHome()
	bundle := NewGitBundle("rupa/z", home)
	bundle.Download()
	srcs := bundle.Sourceables()
	if len(srcs) != 1 {
		t.Error("Expected 1 sourceable file")
	}
}
開發者ID:b4b4r07,項目名稱:antibody,代碼行數:9,代碼來源:git_bundle_test.go

示例10: TestUpdatesListOfRepos

func TestUpdatesListOfRepos(t *testing.T) {
	home := doubles.TempHome()
	bundle1 := "caarlos0/zsh-pg"
	bundle2 := "caarlos0/zsh-add-upstream"
	NewGitBundle(bundle1, home).Download()
	NewGitBundle(bundle2, home).Download()
	// TODO check amount of updated repos
	update(home)
}
開發者ID:b4b4r07,項目名稱:antibody,代碼行數:9,代碼來源:api_test.go

示例11: TestClonesValidRepo

func TestClonesValidRepo(t *testing.T) {
	home := doubles.TempHome()
	bundle := NewGitBundle("caarlos0/zsh-pg", home)
	err := bundle.Download()
	expected := home + "caarlos0-zsh-pg"

	assert.Equal(t, expected, bundle.Folder())
	assert.NoError(t, err)
	assertBundledPlugins(t, 1, home)
}
開發者ID:zhaoyao,項目名稱:dotfiles,代碼行數:10,代碼來源:git_bundle_test.go

示例12: TestClonesValidRepo

func TestClonesValidRepo(t *testing.T) {
	home := doubles.TempHome()
	bundle := NewGitBundle("caarlos0/zsh-pg", home)
	err := bundle.Download()
	expected := home + "caarlos0-zsh-pg"
	if bundle.Folder() != expected {
		t.Error("Got", bundle.Folder(), "expected", expected)
	}
	if err != nil {
		t.Error("No errors expected")
	}
	assertBundledPlugins(t, 1, home)
}
開發者ID:b4b4r07,項目名稱:antibody,代碼行數:13,代碼來源:git_bundle_test.go

示例13: TestBundleWithNoBundles

func TestBundleWithNoBundles(t *testing.T) {
	home := doubles.TempHome()
	ProcessArgs([]string{"bundle", ""}, home, version)
	ProcessArgs([]string{"bundle"}, home, version)
	assertBundledPlugins(t, 0, home)
}
開發者ID:zhaoyao,項目名稱:dotfiles,代碼行數:6,代碼來源:api_test.go

示例14: TestProcessStdinWithEmptyLines

func TestProcessStdinWithEmptyLines(t *testing.T) {
	home := doubles.TempHome()
	bundles := bytes.NewBufferString("\ncaarlos0/zsh-pg\ncaarlos0/zsh-add-upstream\n")
	ProcessStdin(bundles, home)
	assertBundledPlugins(t, 2, home)
}
開發者ID:b4b4r07,項目名稱:antibody,代碼行數:6,代碼來源:api_test.go

示例15: TestProcessesArgsDoBundle

func TestProcessesArgsDoBundle(t *testing.T) {
	home := doubles.TempHome()
	ProcessArgs([]string{"bundle", "caarlos0/zsh-pg"}, home)
	assertBundledPlugins(t, 1, home)
}
開發者ID:b4b4r07,項目名稱:antibody,代碼行數:5,代碼來源:api_test.go


注:本文中的github.com/caarlos0/antibody/doubles.TempHome函數示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。