{"action":"closed","issue":{"url":"https://api.github.com/repos/fatih/vim-go/issues/618","labels_url":"https://api.github.com/repos/fatih/vim-go/issues/618/labels{/name}","comments_url":"https://api.github.com/repos/fatih/vim-go/issues/618/comments","events_url":"https://api.github.com/repos/fatih/vim-go/issues/618/events","html_url":"https://github.com/fatih/vim-go/issues/618","id":118929698,"number":618,"title":":GoTest replaces current buffer with blank","user":{"login":"shazow","id":6292,"avatar_url":"https://avatars.githubusercontent.com/u/6292?v=3","gravatar_id":"","url":"https://api.github.com/users/shazow","html_url":"https://github.com/shazow","followers_url":"https://api.github.com/users/shazow/followers","following_url":"https://api.github.com/users/shazow/following{/other_user}","gists_url":"https://api.github.com/users/shazow/gists{/gist_id}","starred_url":"https://api.github.com/users/shazow/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shazow/subscriptions","organizations_url":"https://api.github.com/users/shazow/orgs","repos_url":"https://api.github.com/users/shazow/repos","events_url":"https://api.github.com/users/shazow/events{/privacy}","received_events_url":"https://api.github.com/users/shazow/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/fatih/vim-go/labels/bug","name":"bug","color":"fc2929"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-11-25T21:50:32Z","updated_at":"2015-12-08T16:15:18Z","closed_at":"2015-12-08T16:15:18Z","body":"Running `:GoTest` on passing tests is fine. Running `:GoTest` on failing tests with no logging/output is fine. Running `:GoTest` with a test that hits code which logs or produces output _and_ fails the test will cause vim-go to replace the current buffer with a blank buffer.\r\n\r\nThe command status line has this in it:\r\n\r\n```\r\n\"2015/11/25 13\" [New file] --No lines in buffer--vim-go: [test] FAIL\r\n```\r\n\r\nMinimal code to reproduce:\r\n\r\n*main_test.go*\r\n\r\n```go\r\npackage main\r\n\r\nimport (\r\n\t\"log\"\r\n\t\"testing\"\r\n)\r\n\r\nfunc Foo() {\r\n\tlog.Printf(\"Foo: Computing the answer.\")\r\n}\r\n\r\nfunc TestFoo(t *testing.T) {\r\n\tFoo()\r\n\tt.Fail() // This prompts `go test` to present the captured output which presumably spawns the empty buffer somehow\r\n}\r\n```\r\n\r\nYou can split it up into main.go/main_test.go if you prefer.\r\n"}}