{"action":"created","comment":{"url":"https://api.github.com/repos/jwilm/vte/pulls/comments/82695034","pull_request_review_id":3526853,"id":82695034,"diff_hunk":"@@ -91,3 +91,41 @@ impl Parser {\n         }\n     }\n }\n+\n+#[cfg(test)]\n+mod tests {\n+    use std::io;\n+    use std::io::prelude::*;\n+    use std::fs::File;\n+    use Receiver;\n+    use Parser;\n+\n+    impl Receiver for String {\n+        fn codepoint(&mut self, c: char) {\n+            self.push(c);\n+        }\n+\n+        fn invalid_sequence(&mut self) {\n+        }\n+    }\n+\n+    #[test]\n+    fn utf8parse_test() {\n+        let mut buffer = String::new();\n+        let mut file = File::open(\"UTF-8-demo.txt\").unwrap();\n+        let mut file_to_string = file.read_to_string(&mut buffer).unwrap();\n+        let parser = Parser::new();\n+\n+        // expected struct `std::vec::Vec`, found usize\n+        let expected = String::from_utf8(file_to_string).unwrap();\n+\n+        // no method named `iter` found for type `usize` in the current scope\n+        let actual = for byte in file_to_string.iter() {\n+            // expected &mut _, found struct `std::string::String`\n+            parser.advance(buffer, byte);","path":"utf8parse/src/lib.rs","position":35,"original_position":35,"commit_id":"6a3571b12d7d4aba67d23d068bf5b81fac8626b0","original_commit_id":"6a3571b12d7d4aba67d23d068bf5b81fac8626b0","user":{"login":"jwilm","id":4285147,"avatar_url":"https://avatars.githubusercontent.com/u/4285147?v=3","gravatar_id":"","url":"https://api.github.com/users/jwilm","html_url":"https://github.com/jwilm","followers_url":"https://api.github.com/users/jwilm/followers","following_url":"https://api.github.com/users/jwilm/following{/other_user}","gists_url":"https://api.github.com/users/jwilm/gists{/gist_id}","starred_url":"https://api.github.com/users/jwilm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jwilm/subscriptions","organizations_url":"https://api.github.com/users/jwilm/orgs","repos_url":"https://api.github.com/users/jwilm/repos","events_url":"https://api.github.com/users/jwilm/events{/privacy}","received_events_url":"https://api.github.com/users/jwilm/received_events","type":"User","site_admin":false},"body":"There's not going to be a useful return value for this loop. The `actual` string you're producing _is_ the receiver that gets passed to `advance()`.","created_at":"2016-10-10T22:30:01Z","updated_at":"2016-10-10T22:31:52Z","html_url":"https://github.com/jwilm/vte/pull/2#discussion_r82695034","pull_request_url":"https://api.github.com/repos/jwilm/vte/pulls/2","_links":{"self":{"href":"https://api.github.com/repos/jwilm/vte/pulls/comments/82695034"},"html":{"href":"https://github.com/jwilm/vte/pull/2#discussion_r82695034"},"pull_request":{"href":"https://api.github.com/repos/jwilm/vte/pulls/2"}}},"pull_request":{"url":"https://api.github.com/repos/jwilm/vte/pulls/2","id":88111497,"html_url":"https://github.com/jwilm/vte/pull/2","diff_url":"https://github.com/jwilm/vte/pull/2.diff","patch_url":"https://github.com/jwilm/vte/pull/2.patch","issue_url":"https://api.github.com/repos/jwilm/vte/issues/2","number":2,"state":"open","locked":false,"title":"WIP: adds test for UTF-8 parsing","user":{"login":"lizbaillie","id":4008348,"avatar_url":"https://avatars.githubusercontent.com/u/4008348?v=3","gravatar_id":"","url":"https://api.github.com/users/lizbaillie","html_url":"https://github.com/lizbaillie","followers_url":"https://api.github.com/users/lizbaillie/followers","following_url":"https://api.github.com/users/lizbaillie/following{/other_user}","gists_url":"https://api.github.com/users/lizbaillie/gists{/gist_id}","starred_url":"https://api.github.com/users/lizbaillie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lizbaillie/subscriptions","organizations_url":"https://api.github.com/users/lizbaillie/orgs","repos_url":"https://api.github.com/users/lizbaillie/repos","events_url":"https://api.github.com/users/lizbaillie/events{/privacy}","received_events_url":"https://api.github.com/users/lizbaillie/received_events","type":"User","site_admin":false},"body":"- adds complicated UTF-8 file for parsing\r\n- very basic test setup\r\n- moved test to proper location\r\n\r\nTODO:\r\n- [ ] define `actual` and `expected` as outlined in #1 ","created_at":"2016-10-05T16:24:27Z","updated_at":"2016-10-10T22:31:52Z","closed_at":null,"merged_at":null,"merge_commit_sha":"4c4c3262d6bf3cc046d5f44c18d33172675a2492","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/jwilm/vte/pulls/2/commits","review_comments_url":"https://api.github.com/repos/jwilm/vte/pulls/2/comments","review_comment_url":"https://api.github.com/repos/jwilm/vte/pulls/comments{/number}","comments_url":"https://api.github.com/repos/jwilm/vte/issues/2/comments","statuses_url":"https://api.github.com/repos/jwilm/vte/statuses/6a3571b12d7d4aba67d23d068bf5b81fac8626b0","head":{"label":"lizbaillie:test-utf8-parsing","ref":"test-utf8-parsing","sha":"6a3571b12d7d4aba67d23d068bf5b81fac8626b0","user":{"login":"lizbaillie","id":4008348,"avatar_url":"https://avatars.githubusercontent.com/u/4008348?v=3","gravatar_id":"","url":"https://api.github.com/users/lizbaillie","html_url":"https://github.com/lizbaillie","followers_url":"https://api.github.com/users/lizbaillie/followers","following_url":"https://api.github.com/users/lizbaillie/following{/other_user}","gists_url":"https://api.github.com/users/lizbaillie/gists{/gist_id}","starred_url":"https://api.github.com/users/lizbaillie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lizbaillie/subscriptions","organizations_url":"https://api.github.com/users/lizbaillie/orgs","repos_url":"https://api.github.com/users/lizbaillie/repos","events_url":"https://api.github.com/users/lizbaillie/events{/privacy}","received_events_url":"https://api.github.com/users/lizbaillie/received_events","type":"User","site_admin":false},"repo":{"id":69974469,"name":"vte","full_name":"lizbaillie/vte","owner":{"login":"lizbaillie","id":4008348,"avatar_url":"https://avatars.githubusercontent.com/u/4008348?v=3","gravatar_id":"","url":"https://api.github.com/users/lizbaillie","html_url":"https://github.com/lizbaillie","followers_url":"https://api.github.com/users/lizbaillie/followers","following_url":"https://api.github.com/users/lizbaillie/following{/other_user}","gists_url":"https://api.github.com/users/lizbaillie/gists{/gist_id}","starred_url":"https://api.github.com/users/lizbaillie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lizbaillie/subscriptions","organizations_url":"https://api.github.com/users/lizbaillie/orgs","repos_url":"https://api.github.com/users/lizbaillie/repos","events_url":"https://api.github.com/users/lizbaillie/events{/privacy}","received_events_url":"https://api.github.com/users/lizbaillie/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/lizbaillie/vte","description":"Parser for virtual terminal emulators","fork":true,"url":"https://api.github.com/repos/lizbaillie/vte","forks_url":"https://api.github.com/repos/lizbaillie/vte/forks","keys_url":"https://api.github.com/repos/lizbaillie/vte/keys{/key_id}","collaborators_url":"https://api.github.com/repos/lizbaillie/vte/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/lizbaillie/vte/teams","hooks_url":"https://api.github.com/repos/lizbaillie/vte/hooks","issue_events_url":"https://api.github.com/repos/lizbaillie/vte/issues/events{/number}","events_url":"https://api.github.com/repos/lizbaillie/vte/events","assignees_url":"https://api.github.com/repos/lizbaillie/vte/assignees{/user}","branches_url":"https://api.github.com/repos/lizbaillie/vte/branches{/branch}","tags_url":"https://api.github.com/repos/lizbaillie/vte/tags","blobs_url":"https://api.github.com/repos/lizbaillie/vte/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/lizbaillie/vte/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/lizbaillie/vte/git/refs{/sha}","trees_url":"https://api.github.com/repos/lizbaillie/vte/git/trees{/sha}","statuses_url":"https://api.github.com/repos/lizbaillie/vte/statuses/{sha}","languages_url":"https://api.github.com/repos/lizbaillie/vte/languages","stargazers_url":"https://api.github.com/repos/lizbaillie/vte/stargazers","contributors_url":"https://api.github.com/repos/lizbaillie/vte/contributors","subscribers_url":"https://api.github.com/repos/lizbaillie/vte/subscribers","subscription_url":"https://api.github.com/repos/lizbaillie/vte/subscription","commits_url":"https://api.github.com/repos/lizbaillie/vte/commits{/sha}","git_commits_url":"https://api.github.com/repos/lizbaillie/vte/git/commits{/sha}","comments_url":"https://api.github.com/repos/lizbaillie/vte/comments{/number}","issue_comment_url":"https://api.github.com/repos/lizbaillie/vte/issues/comments{/number}","contents_url":"https://api.github.com/repos/lizbaillie/vte/contents/{+path}","compare_url":"https://api.github.com/repos/lizbaillie/vte/compare/{base}...{head}","merges_url":"https://api.github.com/repos/lizbaillie/vte/merges","archive_url":"https://api.github.com/repos/lizbaillie/vte/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/lizbaillie/vte/downloads","issues_url":"https://api.github.com/repos/lizbaillie/vte/issues{/number}","pulls_url":"https://api.github.com/repos/lizbaillie/vte/pulls{/number}","milestones_url":"https://api.github.com/repos/lizbaillie/vte/milestones{/number}","notifications_url":"https://api.github.com/repos/lizbaillie/vte/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/lizbaillie/vte/labels{/name}","releases_url":"https://api.github.com/repos/lizbaillie/vte/releases{/id}","deployments_url":"https://api.github.com/repos/lizbaillie/vte/deployments","created_at":"2016-10-04T14:42:19Z","updated_at":"2016-10-04T14:42:20Z","pushed_at":"2016-10-09T06:36:17Z","git_url":"git://github.com/lizbaillie/vte.git","ssh_url":"git@github.com:lizbaillie/vte.git","clone_url":"https://github.com/lizbaillie/vte.git","svn_url":"https://github.com/lizbaillie/vte","homepage":"https://docs.rs/vte/","size":50,"stargazers_count":0,"watchers_count":0,"language":"Rust","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"jwilm:master","ref":"master","sha":"5509849473c7549c95b6a3ef87af8075c50d5da7","user":{"login":"jwilm","id":4285147,"avatar_url":"https://avatars.githubusercontent.com/u/4285147?v=3","gravatar_id":"","url":"https://api.github.com/users/jwilm","html_url":"https://github.com/jwilm","followers_url":"https://api.github.com/users/jwilm/followers","following_url":"https://api.github.com/users/jwilm/following{/other_user}","gists_url":"https://api.github.com/users/jwilm/gists{/gist_id}","starred_url":"https://api.github.com/users/jwilm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jwilm/subscriptions","organizations_url":"https://api.github.com/users/jwilm/orgs","repos_url":"https://api.github.com/users/jwilm/repos","events_url":"https://api.github.com/users/jwilm/events{/privacy}","received_events_url":"https://api.github.com/users/jwilm/received_events","type":"User","site_admin":false},"repo":{"id":68033186,"name":"vte","full_name":"jwilm/vte","owner":{"login":"jwilm","id":4285147,"avatar_url":"https://avatars.githubusercontent.com/u/4285147?v=3","gravatar_id":"","url":"https://api.github.com/users/jwilm","html_url":"https://github.com/jwilm","followers_url":"https://api.github.com/users/jwilm/followers","following_url":"https://api.github.com/users/jwilm/following{/other_user}","gists_url":"https://api.github.com/users/jwilm/gists{/gist_id}","starred_url":"https://api.github.com/users/jwilm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jwilm/subscriptions","organizations_url":"https://api.github.com/users/jwilm/orgs","repos_url":"https://api.github.com/users/jwilm/repos","events_url":"https://api.github.com/users/jwilm/events{/privacy}","received_events_url":"https://api.github.com/users/jwilm/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jwilm/vte","description":"Parser for virtual terminal emulators","fork":false,"url":"https://api.github.com/repos/jwilm/vte","forks_url":"https://api.github.com/repos/jwilm/vte/forks","keys_url":"https://api.github.com/repos/jwilm/vte/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jwilm/vte/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jwilm/vte/teams","hooks_url":"https://api.github.com/repos/jwilm/vte/hooks","issue_events_url":"https://api.github.com/repos/jwilm/vte/issues/events{/number}","events_url":"https://api.github.com/repos/jwilm/vte/events","assignees_url":"https://api.github.com/repos/jwilm/vte/assignees{/user}","branches_url":"https://api.github.com/repos/jwilm/vte/branches{/branch}","tags_url":"https://api.github.com/repos/jwilm/vte/tags","blobs_url":"https://api.github.com/repos/jwilm/vte/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jwilm/vte/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jwilm/vte/git/refs{/sha}","trees_url":"https://api.github.com/repos/jwilm/vte/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jwilm/vte/statuses/{sha}","languages_url":"https://api.github.com/repos/jwilm/vte/languages","stargazers_url":"https://api.github.com/repos/jwilm/vte/stargazers","contributors_url":"https://api.github.com/repos/jwilm/vte/contributors","subscribers_url":"https://api.github.com/repos/jwilm/vte/subscribers","subscription_url":"https://api.github.com/repos/jwilm/vte/subscription","commits_url":"https://api.github.com/repos/jwilm/vte/commits{/sha}","git_commits_url":"https://api.github.com/repos/jwilm/vte/git/commits{/sha}","comments_url":"https://api.github.com/repos/jwilm/vte/comments{/number}","issue_comment_url":"https://api.github.com/repos/jwilm/vte/issues/comments{/number}","contents_url":"https://api.github.com/repos/jwilm/vte/contents/{+path}","compare_url":"https://api.github.com/repos/jwilm/vte/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jwilm/vte/merges","archive_url":"https://api.github.com/repos/jwilm/vte/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jwilm/vte/downloads","issues_url":"https://api.github.com/repos/jwilm/vte/issues{/number}","pulls_url":"https://api.github.com/repos/jwilm/vte/pulls{/number}","milestones_url":"https://api.github.com/repos/jwilm/vte/milestones{/number}","notifications_url":"https://api.github.com/repos/jwilm/vte/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jwilm/vte/labels{/name}","releases_url":"https://api.github.com/repos/jwilm/vte/releases{/id}","deployments_url":"https://api.github.com/repos/jwilm/vte/deployments","created_at":"2016-09-12T17:50:51Z","updated_at":"2016-10-02T08:19:14Z","pushed_at":"2016-10-09T06:36:17Z","git_url":"git://github.com/jwilm/vte.git","ssh_url":"git@github.com:jwilm/vte.git","clone_url":"https://github.com/jwilm/vte.git","svn_url":"https://github.com/jwilm/vte","homepage":"https://docs.rs/vte/","size":39,"stargazers_count":2,"watchers_count":2,"language":"Rust","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":2,"forks":1,"open_issues":2,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/jwilm/vte/pulls/2"},"html":{"href":"https://github.com/jwilm/vte/pull/2"},"issue":{"href":"https://api.github.com/repos/jwilm/vte/issues/2"},"comments":{"href":"https://api.github.com/repos/jwilm/vte/issues/2/comments"},"review_comments":{"href":"https://api.github.com/repos/jwilm/vte/pulls/2/comments"},"review_comment":{"href":"https://api.github.com/repos/jwilm/vte/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/jwilm/vte/pulls/2/commits"},"statuses":{"href":"https://api.github.com/repos/jwilm/vte/statuses/6a3571b12d7d4aba67d23d068bf5b81fac8626b0"}}}}
{"actor":{"display_login":"jwilm"}}