示例#1
0
文件: path_test.go 项目: CowLeo/qdb
func (*pathSuite) TestTrimGoPath(c *gc.C) {
	relativeImport := "github.com/foo/bar/baz.go"
	filename := path.Join(errors.GoPath(), relativeImport)
	c.Assert(errors.TrimGoPath(filename), gc.Equals, relativeImport)

	absoluteImport := "/usr/share/foo/bar/baz.go"
	c.Assert(errors.TrimGoPath(absoluteImport), gc.Equals, absoluteImport)
}
示例#2
0
文件: path_test.go 项目: CowLeo/qdb
func (*pathSuite) TestGoPathSet(c *gc.C) {
	c.Assert(errors.GoPath(), gc.Not(gc.Equals), "")
}