• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Golang doubles.TempHome函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Golang中github.com/caarlos0/antibody/doubles.TempHome函数的典型用法代码示例。如果您正苦于以下问题:Golang TempHome函数的具体用法?Golang TempHome怎么用?Golang TempHome使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了TempHome函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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


示例16: TestUpdateWithNoPlugins

func TestUpdateWithNoPlugins(t *testing.T) {
	home := doubles.TempHome()
	ProcessArgs([]string{"update"}, home)
	assertBundledPlugins(t, 0, home)
}
开发者ID:b4b4r07,项目名称:antibody,代码行数:5,代码来源:api_test.go


示例17: TestClonesInvalidRepo

func TestClonesInvalidRepo(t *testing.T) {
	home := doubles.TempHome()
	err := NewGitBundle("this-doesnt-exist", home).Download()
	assert.Error(t, err)
}
开发者ID:zhaoyao,项目名称:dotfiles,代码行数:5,代码来源:git_bundle_test.go


示例18: TestBundleMkdirs

func TestBundleMkdirs(t *testing.T) {
	home := filepath.Join(doubles.TempHome(), "long/folder/which/dont/exist")
	bundle("caarlos0/zsh-pg", home)
	ProcessArgs([]string{"update"}, home)
	assertBundledPlugins(t, 1, home)
}
开发者ID:b4b4r07,项目名称:antibody,代码行数:6,代码来源:api_test.go


示例19: TestVersion

func TestVersion(t *testing.T) {
	home := doubles.TempHome()
	ProcessArgs([]string{"version"}, home)
	assertBundledPlugins(t, 0, home)
}
开发者ID:b4b4r07,项目名称:antibody,代码行数:5,代码来源:api_test.go


示例20: TestUpdateWithPlugins

func TestUpdateWithPlugins(t *testing.T) {
	home := doubles.TempHome()
	bundle("caarlos0/zsh-pg", home)
	ProcessArgs([]string{"update"}, home)
	assertBundledPlugins(t, 1, home)
}
开发者ID:b4b4r07,项目名称:antibody,代码行数:6,代码来源:api_test.go



注:本文中的github.com/caarlos0/antibody/doubles.TempHome函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Golang env.Parse函数代码示例发布时间:2022-05-24
下一篇:
Golang cfg.Cfg类代码示例发布时间:2022-05-24
热门推荐
热门话题
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap