From a1ac17f16cd894f04a7b9862446393440b749b1e Mon Sep 17 00:00:00 2001 From: aarzilli Date: Wed, 18 May 2016 09:07:19 +0200 Subject: [PATCH] service/test: Added test for issue #528 This issue is fixed by go 1.7, the test will only run on newer versions of the compiler. --- _fixtures/issue528.go | 12 ++++++++++++ service/test/integration2_test.go | 19 ++++++++++++++++++- 2 files changed, 30 insertions(+), 1 deletion(-) create mode 100644 _fixtures/issue528.go diff --git a/_fixtures/issue528.go b/_fixtures/issue528.go new file mode 100644 index 00000000..635edd36 --- /dev/null +++ b/_fixtures/issue528.go @@ -0,0 +1,12 @@ +package main + +import ( + "fmt" + "github.com/peterh/liner" +) + +func main() { + line := liner.NewLiner() + line.Close() + fmt.Printf("test\n") +} diff --git a/service/test/integration2_test.go b/service/test/integration2_test.go index d8d36c94..6f79856f 100644 --- a/service/test/integration2_test.go +++ b/service/test/integration2_test.go @@ -4,13 +4,13 @@ import ( "fmt" "math/rand" "net" + "os" "path/filepath" "runtime" "strconv" "strings" "testing" "time" - "os" protest "github.com/derekparker/delve/proc/test" @@ -1100,3 +1100,20 @@ func TestEvalExprName(t *testing.T) { } }) } + +func TestClientServer_Issue528(t *testing.T) { + // FindLocation with Receiver.MethodName syntax does not work + // on remote package names due to a bug in debug/gosym that + // Was fixed in go 1.7 // Commit that fixes the issue in go: + // f744717d1924340b8f5e5a385e99078693ad9097 + + ver, _ := proc.ParseVersionString(runtime.Version()) + if ver.Major > 0 && !ver.AfterOrEqual(proc.GoVersion{1, 7, 0, 0, 0}) { + t.Log("Test skipped") + return + } + + withTestClient2("issue528", t, func(c service.Client) { + findLocationHelper(t, c, "State.Close", false, 1, 0) + }) +} -- GitLab