{"action":"created","issue":{"url":"https://api.github.com/repos/pope/ob-go/issues/6","repository_url":"https://api.github.com/repos/pope/ob-go","labels_url":"https://api.github.com/repos/pope/ob-go/issues/6/labels{/name}","comments_url":"https://api.github.com/repos/pope/ob-go/issues/6/comments","events_url":"https://api.github.com/repos/pope/ob-go/issues/6/events","html_url":"https://github.com/pope/ob-go/pull/6","id":141361038,"number":6,"title":"Add unit testing","user":{"login":"tiago4orion","id":251478,"avatar_url":"https://avatars.githubusercontent.com/u/251478?v=3","gravatar_id":"","url":"https://api.github.com/users/tiago4orion","html_url":"https://github.com/tiago4orion","followers_url":"https://api.github.com/users/tiago4orion/followers","following_url":"https://api.github.com/users/tiago4orion/following{/other_user}","gists_url":"https://api.github.com/users/tiago4orion/gists{/gist_id}","starred_url":"https://api.github.com/users/tiago4orion/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tiago4orion/subscriptions","organizations_url":"https://api.github.com/users/tiago4orion/orgs","repos_url":"https://api.github.com/users/tiago4orion/repos","events_url":"https://api.github.com/users/tiago4orion/events{/privacy}","received_events_url":"https://api.github.com/users/tiago4orion/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2016-03-16T18:27:43Z","updated_at":"2016-03-16T22:04:57Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/pope/ob-go/pulls/6","html_url":"https://github.com/pope/ob-go/pull/6","diff_url":"https://github.com/pope/ob-go/pull/6.diff","patch_url":"https://github.com/pope/ob-go/pull/6.patch"},"body":"Hello,\r\n\r\nI added some unit testing to make sure everything is working as expected. This way it's much more easy to add the missing features without breaking the existing ones.\r\n\r\nI've interest in implement the list and matrix option for variables. I'm using `ob-go` on a big literate software.\r\n\r\nThe tests use the Emacs ERT built in package for testing, then no dependencies are required for Emacs >= 24. The way it was tested is the same as orgmode core tests are implemented, using org-id to look for code blocks in a org file. In the future, if you have interest in add ob-go to orgmode repository, the task will be trivial.\r\n\r\nThe macro `org-test-at-id` was copied from `~/org/testing/org-test.el`, it makes the magic of find the correct code block in the org test file.\r\n\r\nI made two changes in the ob-go.el  file:\r\n\r\n1. The name of the variable `org-babel-go-command` was changed to `org-babel-go-compiler` for consistency with others babel implementations.\r\n2. The function `ob-go-get-var` was created for compatibility between orgmode 8.2 and >= 8.3, because the function `org-babel-get-header` was removed in the last version.\r\n\r\n- I created a makefile with a test rule;\r\n- Added some info in README about the testing (maybe someone else interested in contribute can find useful);\r\n\r\nLet me know if something is not good or if it caused some problem on your environment.\r\n\r\n[]'s \r\n\r\n"},"comment":{"url":"https://api.github.com/repos/pope/ob-go/issues/comments/197572918","html_url":"https://github.com/pope/ob-go/pull/6#issuecomment-197572918","issue_url":"https://api.github.com/repos/pope/ob-go/issues/6","id":197572918,"user":{"login":"pope","id":2941,"avatar_url":"https://avatars.githubusercontent.com/u/2941?v=3","gravatar_id":"","url":"https://api.github.com/users/pope","html_url":"https://github.com/pope","followers_url":"https://api.github.com/users/pope/followers","following_url":"https://api.github.com/users/pope/following{/other_user}","gists_url":"https://api.github.com/users/pope/gists{/gist_id}","starred_url":"https://api.github.com/users/pope/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pope/subscriptions","organizations_url":"https://api.github.com/users/pope/orgs","repos_url":"https://api.github.com/users/pope/repos","events_url":"https://api.github.com/users/pope/events{/privacy}","received_events_url":"https://api.github.com/users/pope/received_events","type":"User","site_admin":false},"created_at":"2016-03-16T22:04:57Z","updated_at":"2016-03-16T22:04:57Z","body":"Awesomeness. I'm also cool with the go-mode import. I bet I used that many moons ago but forgot to pull it out.\r\n\r\nGoing to merge it now. Thanks so much for making this better!"}}