{"action":"created","issue":{"url":"https://api.github.com/repos/janko-m/vim-test/issues/34","labels_url":"https://api.github.com/repos/janko-m/vim-test/issues/34/labels{/name}","comments_url":"https://api.github.com/repos/janko-m/vim-test/issues/34/comments","events_url":"https://api.github.com/repos/janko-m/vim-test/issues/34/events","html_url":"https://github.com/janko-m/vim-test/issues/34","id":73439731,"number":34,"title":"error when running Go tests","user":{"login":"kevinburke","id":234019,"avatar_url":"https://avatars.githubusercontent.com/u/234019?v=3","gravatar_id":"","url":"https://api.github.com/users/kevinburke","html_url":"https://github.com/kevinburke","followers_url":"https://api.github.com/users/kevinburke/followers","following_url":"https://api.github.com/users/kevinburke/following{/other_user}","gists_url":"https://api.github.com/users/kevinburke/gists{/gist_id}","starred_url":"https://api.github.com/users/kevinburke/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kevinburke/subscriptions","organizations_url":"https://api.github.com/users/kevinburke/orgs","repos_url":"https://api.github.com/users/kevinburke/repos","events_url":"https://api.github.com/users/kevinburke/events{/privacy}","received_events_url":"https://api.github.com/users/kevinburke/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-05-05T21:39:40Z","updated_at":"2015-05-05T23:07:36Z","closed_at":null,"body":"Not sure quite what's going on - this is a smaller example than my actual test, which doesn't compile, but is sufficient to reproduce the issue. in this test file:\r\n\r\n```\r\nfunc TestSwap(t *testing.T) {\r\n\ta := &Member{\r\n\t\tTrack: []tracks.Element{\r\n\t\t\t{Segment: tracks.TS_MAP[tracks.ELEM_FLAT]},\r\n\t\t\t{Segment: tracks.TS_MAP[tracks.ELEM_25_DEG_UP]},\r\n\t\t},\r\n\t}\r\n\tif a.Track[0] != \"\" || a.Track[1] != \"\" {\r\n\t\tt.Errorf(\"expected d to be %v, was %v\", dexpected, d.Track)\r\n\t}\r\n}\r\n```\r\n\r\nIf I call `:TestNearest` from the `a :=` line, the test runs fine. If I call it from the `if` statement, I get the following error:\r\n\r\n```\r\nError detected while processing function WriteAndRunTest..test#run..test#base#build_position..test#go#gotest#build_position..<SNR>94_nearest_test..test#base#nearest_test:\r\nline   18:\r\nE684: list index out of range: 0\r\nE116: Invalid arguments for function add \r\n```\r\n\r\nNot sure what's going on, I haven't dug into the guts of the plugin. Let me know if you need more data about my system. I'm running vim-test commit 5ca90c0."},"comment":{"url":"https://api.github.com/repos/janko-m/vim-test/issues/comments/99256268","html_url":"https://github.com/janko-m/vim-test/issues/34#issuecomment-99256268","issue_url":"https://api.github.com/repos/janko-m/vim-test/issues/34","id":99256268,"user":{"login":"janko-m","id":795488,"avatar_url":"https://avatars.githubusercontent.com/u/795488?v=3","gravatar_id":"","url":"https://api.github.com/users/janko-m","html_url":"https://github.com/janko-m","followers_url":"https://api.github.com/users/janko-m/followers","following_url":"https://api.github.com/users/janko-m/following{/other_user}","gists_url":"https://api.github.com/users/janko-m/gists{/gist_id}","starred_url":"https://api.github.com/users/janko-m/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/janko-m/subscriptions","organizations_url":"https://api.github.com/users/janko-m/orgs","repos_url":"https://api.github.com/users/janko-m/repos","events_url":"https://api.github.com/users/janko-m/events{/privacy}","received_events_url":"https://api.github.com/users/janko-m/received_events","type":"User","site_admin":false},"created_at":"2015-05-05T23:07:36Z","updated_at":"2015-05-05T23:07:36Z","body":"Thanks, that's all I need to start digging. The error happens when parsing the file for running the nearest test, I just need to correct that function."}}