{"action":"created","comment":{"url":"https://api.github.com/repos/fjordllc/interns/pulls/comments/52159889","id":52159889,"diff_hunk":"@@ -0,0 +1,168 @@\n+var assert = require(\"assert\"),\n+    path = require(\"path\"),\n+    entities = require(\"../\");\n+\n+describe(\"Encode->decode test\", function(){\n+\tvar testcases = [\n+\t\t{\n+\t\t\tinput: \"asdf & ÿ ü '\",\n+\t\t\txml: \"asdf &amp; &#xFF; &#xFC; &apos;\",\n+\t\t\thtml: \"asdf &amp; &yuml; &uuml; &apos;\"\n+\t\t}, {\n+\t\t\tinput: \"&#38;\",\n+\t\t\txml: \"&amp;#38;\",\n+\t\t\thtml: \"&amp;&num;38&semi;\"\n+\t\t},\n+\t];\n+\ttestcases.forEach(function(tc) {\n+\t\tvar encodedXML = entities.encodeXML(tc.input);\n+\t\tit(\"should XML encode \" + tc.input, function(){\n+\t\t\tassert.equal(encodedXML, tc.xml);\n+\t\t});\n+\t\tit(\"should default to XML encode \" + tc.input, function(){\n+\t\t\tassert.equal(entities.encode(tc.input), tc.xml);\n+\t\t});\n+\t\tit(\"should XML decode \" + encodedXML, function(){\n+\t\t\tassert.equal(entities.decodeXML(encodedXML), tc.input);\n+\t\t});\n+\t\tit(\"should default to XML encode \" + encodedXML, function(){\n+\t\t\tassert.equal(entities.decode(encodedXML), tc.input);\n+\t\t});\n+\t\tit(\"should default strict to XML encode \" + encodedXML, function(){\n+\t\t\tassert.equal(entities.decodeStrict(encodedXML), tc.input);\n+\t\t});\n+\n+\t\tvar encodedHTML5 = entities.encodeHTML5(tc.input);\n+\t\tit(\"should HTML5 encode \" + tc.input, function(){\n+\t\t\tassert.equal(encodedHTML5, tc.html);\n+\t\t});\n+\t\tit(\"should HTML5 decode \" + encodedHTML5, function(){\n+\t\t\tassert.equal(entities.decodeHTML(encodedHTML5), tc.input);\n+\t\t});\n+\t});\n+\n+\tit(\"should encode data URIs (issue 16)\", function(){\n+\t\tvar data = \"data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAALAAABAAEAAAIBRAA7\";\n+\t\tassert.equal(entities.decode(entities.encode(data)), data);\n+\t});\n+});\n+\n+describe(\"Decode test\", function(){\n+\tvar testcases = [\n+\t\t{ input: \"&amp;amp;\",  output: \"&amp;\" },\n+\t\t{ input: \"&amp;#38;\",  output: \"&#38;\" },\n+\t\t{ input: \"&amp;#x26;\", output: \"&#x26;\" },\n+\t\t{ input: \"&amp;#X26;\", output: \"&#X26;\" },\n+\t\t{ input: \"&#38;#38;\",  output: \"&#38;\" },\n+\t\t{ input: \"&#x26;#38;\", output: \"&#38;\" },\n+\t\t{ input: \"&#X26;#38;\", output: \"&#38;\" },\n+\t\t{ input: \"&#x3a;\",     output: \":\" },\n+\t\t{ input: \"&#x3A;\",     output: \":\" },\n+\t\t{ input: \"&#X3a;\",     output: \":\" },\n+\t\t{ input: \"&#X3A;\",     output: \":\" }\n+\t];\n+\ttestcases.forEach(function(tc) {\n+\t\tit(\"should XML decode \" + tc.input, function(){\n+\t\t\tassert.equal(entities.decodeXML(tc.input), tc.output);\n+\t\t});\n+\t\tit(\"should HTML4 decode \" + tc.input, function(){\n+\t\t\tassert.equal(entities.decodeHTML(tc.input), tc.output);\n+\t\t});\n+\t\tit(\"should HTML5 decode \" + tc.input, function(){\n+\t\t\tassert.equal(entities.decodeHTML(tc.input), tc.output);\n+\t\t});\n+\t});\n+});\n+\n+var levels = [\"xml\", \"entities\"];\n+\n+describe(\"Documents\", function(){\n+\tlevels\n+\t.map(function(n){ return path.join(\"..\", \"maps\", n); })\n+\t.map(require)\n+\t.forEach(function(doc, i){\n+\t\tdescribe(\"Decode\", function(){\n+\t\t\tit(levels[i], function(){\n+\t\t\t\tObject.keys(doc).forEach(function(e){\n+\t\t\t\t\tfor(var l = i; l < levels.length; l++){\n+\t\t\t\t\t\tassert.equal(entities.decode(\"&\" + e + \";\", l), doc[e]);\n+\t\t\t\t\t}\n+\t\t\t\t});\n+\t\t\t});\n+\t\t});\n+\n+\t\tdescribe(\"Decode strict\", function(){\n+\t\t\tit(levels[i], function(){\n+\t\t\t\tObject.keys(doc).forEach(function(e){\n+\t\t\t\t\tfor(var l = i; l < levels.length; l++){\n+\t\t\t\t\t\tassert.equal(entities.decodeStrict(\"&\" + e + \";\", l), doc[e]);\n+\t\t\t\t\t}\n+\t\t\t\t});\n+\t\t\t});\n+\t\t});\n+\n+\t\tdescribe(\"Encode\", function(){\n+\t\t\tit(levels[i], function(){\n+\t\t\t\tObject.keys(doc).forEach(function(e){\n+\t\t\t\t\tfor(var l = i; l < levels.length; l++){\n+\t\t\t\t\t\tassert.equal(entities.decode(entities.encode(doc[e], l), l), doc[e]);\n+\t\t\t\t\t}\n+\t\t\t\t});\n+\t\t\t});\n+\t\t});\n+\t});\n+\n+\tvar legacy = require(\"../maps/legacy.json\");","path":"node_modules/entities/test/test.js","position":115,"original_position":115,"commit_id":"87904aaf5c94847dd8ecf3b78345c0488bba2f13","original_commit_id":"87904aaf5c94847dd8ecf3b78345c0488bba2f13","user":{"login":"houndci","id":6697940,"avatar_url":"https://avatars.githubusercontent.com/u/6697940?v=3","gravatar_id":"","url":"https://api.github.com/users/houndci","html_url":"https://github.com/houndci","followers_url":"https://api.github.com/users/houndci/followers","following_url":"https://api.github.com/users/houndci/following{/other_user}","gists_url":"https://api.github.com/users/houndci/gists{/gist_id}","starred_url":"https://api.github.com/users/houndci/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/houndci/subscriptions","organizations_url":"https://api.github.com/users/houndci/orgs","repos_url":"https://api.github.com/users/houndci/repos","events_url":"https://api.github.com/users/houndci/events{/privacy}","received_events_url":"https://api.github.com/users/houndci/received_events","type":"User","site_admin":false},"body":"'require' is not defined.","created_at":"2016-02-08T11:52:22Z","updated_at":"2016-02-08T11:52:22Z","html_url":"https://github.com/fjordllc/interns/pull/108#discussion_r52159889","pull_request_url":"https://api.github.com/repos/fjordllc/interns/pulls/108","_links":{"self":{"href":"https://api.github.com/repos/fjordllc/interns/pulls/comments/52159889"},"html":{"href":"https://github.com/fjordllc/interns/pull/108#discussion_r52159889"},"pull_request":{"href":"https://api.github.com/repos/fjordllc/interns/pulls/108"}}},"pull_request":{"url":"https://api.github.com/repos/fjordllc/interns/pulls/108","id":58599632,"html_url":"https://github.com/fjordllc/interns/pull/108","diff_url":"https://github.com/fjordllc/interns/pull/108.diff","patch_url":"https://github.com/fjordllc/interns/pull/108.patch","issue_url":"https://api.github.com/repos/fjordllc/interns/issues/108","number":108,"state":"closed","locked":false,"title":"[WIP] Test","user":{"login":"machida","id":168265,"avatar_url":"https://avatars.githubusercontent.com/u/168265?v=3","gravatar_id":"","url":"https://api.github.com/users/machida","html_url":"https://github.com/machida","followers_url":"https://api.github.com/users/machida/followers","following_url":"https://api.github.com/users/machida/following{/other_user}","gists_url":"https://api.github.com/users/machida/gists{/gist_id}","starred_url":"https://api.github.com/users/machida/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/machida/subscriptions","organizations_url":"https://api.github.com/users/machida/orgs","repos_url":"https://api.github.com/users/machida/repos","events_url":"https://api.github.com/users/machida/events{/privacy}","received_events_url":"https://api.github.com/users/machida/received_events","type":"User","site_admin":false},"body":"Houndの動きを試すためのテストPRです。","created_at":"2016-02-08T11:51:04Z","updated_at":"2016-02-08T11:52:22Z","closed_at":"2016-02-08T11:51:32Z","merged_at":null,"merge_commit_sha":"d2b89c5f7634ac05e5f48a9df52b1acd8d13ce4b","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/fjordllc/interns/pulls/108/commits","review_comments_url":"https://api.github.com/repos/fjordllc/interns/pulls/108/comments","review_comment_url":"https://api.github.com/repos/fjordllc/interns/pulls/comments{/number}","comments_url":"https://api.github.com/repos/fjordllc/interns/issues/108/comments","statuses_url":"https://api.github.com/repos/fjordllc/interns/statuses/87904aaf5c94847dd8ecf3b78345c0488bba2f13","head":{"label":"fjordllc:test","ref":"test","sha":"87904aaf5c94847dd8ecf3b78345c0488bba2f13","user":{"login":"fjordllc","id":1106666,"avatar_url":"https://avatars.githubusercontent.com/u/1106666?v=3","gravatar_id":"","url":"https://api.github.com/users/fjordllc","html_url":"https://github.com/fjordllc","followers_url":"https://api.github.com/users/fjordllc/followers","following_url":"https://api.github.com/users/fjordllc/following{/other_user}","gists_url":"https://api.github.com/users/fjordllc/gists{/gist_id}","starred_url":"https://api.github.com/users/fjordllc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fjordllc/subscriptions","organizations_url":"https://api.github.com/users/fjordllc/orgs","repos_url":"https://api.github.com/users/fjordllc/repos","events_url":"https://api.github.com/users/fjordllc/events{/privacy}","received_events_url":"https://api.github.com/users/fjordllc/received_events","type":"Organization","site_admin":false},"repo":{"id":5139175,"name":"interns","full_name":"fjordllc/interns","owner":{"login":"fjordllc","id":1106666,"avatar_url":"https://avatars.githubusercontent.com/u/1106666?v=3","gravatar_id":"","url":"https://api.github.com/users/fjordllc","html_url":"https://github.com/fjordllc","followers_url":"https://api.github.com/users/fjordllc/followers","following_url":"https://api.github.com/users/fjordllc/following{/other_user}","gists_url":"https://api.github.com/users/fjordllc/gists{/gist_id}","starred_url":"https://api.github.com/users/fjordllc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fjordllc/subscriptions","organizations_url":"https://api.github.com/users/fjordllc/orgs","repos_url":"https://api.github.com/users/fjordllc/repos","events_url":"https://api.github.com/users/fjordllc/events{/privacy}","received_events_url":"https://api.github.com/users/fjordllc/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/fjordllc/interns","description":"Interns and E-Learning Management System.","fork":false,"url":"https://api.github.com/repos/fjordllc/interns","forks_url":"https://api.github.com/repos/fjordllc/interns/forks","keys_url":"https://api.github.com/repos/fjordllc/interns/keys{/key_id}","collaborators_url":"https://api.github.com/repos/fjordllc/interns/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/fjordllc/interns/teams","hooks_url":"https://api.github.com/repos/fjordllc/interns/hooks","issue_events_url":"https://api.github.com/repos/fjordllc/interns/issues/events{/number}","events_url":"https://api.github.com/repos/fjordllc/interns/events","assignees_url":"https://api.github.com/repos/fjordllc/interns/assignees{/user}","branches_url":"https://api.github.com/repos/fjordllc/interns/branches{/branch}","tags_url":"https://api.github.com/repos/fjordllc/interns/tags","blobs_url":"https://api.github.com/repos/fjordllc/interns/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/fjordllc/interns/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/fjordllc/interns/git/refs{/sha}","trees_url":"https://api.github.com/repos/fjordllc/interns/git/trees{/sha}","statuses_url":"https://api.github.com/repos/fjordllc/interns/statuses/{sha}","languages_url":"https://api.github.com/repos/fjordllc/interns/languages","stargazers_url":"https://api.github.com/repos/fjordllc/interns/stargazers","contributors_url":"https://api.github.com/repos/fjordllc/interns/contributors","subscribers_url":"https://api.github.com/repos/fjordllc/interns/subscribers","subscription_url":"https://api.github.com/repos/fjordllc/interns/subscription","commits_url":"https://api.github.com/repos/fjordllc/interns/commits{/sha}","git_commits_url":"https://api.github.com/repos/fjordllc/interns/git/commits{/sha}","comments_url":"https://api.github.com/repos/fjordllc/interns/comments{/number}","issue_comment_url":"https://api.github.com/repos/fjordllc/interns/issues/comments{/number}","contents_url":"https://api.github.com/repos/fjordllc/interns/contents/{+path}","compare_url":"https://api.github.com/repos/fjordllc/interns/compare/{base}...{head}","merges_url":"https://api.github.com/repos/fjordllc/interns/merges","archive_url":"https://api.github.com/repos/fjordllc/interns/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/fjordllc/interns/downloads","issues_url":"https://api.github.com/repos/fjordllc/interns/issues{/number}","pulls_url":"https://api.github.com/repos/fjordllc/interns/pulls{/number}","milestones_url":"https://api.github.com/repos/fjordllc/interns/milestones{/number}","notifications_url":"https://api.github.com/repos/fjordllc/interns/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/fjordllc/interns/labels{/name}","releases_url":"https://api.github.com/repos/fjordllc/interns/releases{/id}","deployments_url":"https://api.github.com/repos/fjordllc/interns/deployments","created_at":"2012-07-22T04:59:57Z","updated_at":"2016-01-15T01:51:52Z","pushed_at":"2016-02-08T11:51:05Z","git_url":"git://github.com/fjordllc/interns.git","ssh_url":"git@github.com:fjordllc/interns.git","clone_url":"https://github.com/fjordllc/interns.git","svn_url":"https://github.com/fjordllc/interns","homepage":"","size":14831,"stargazers_count":31,"watchers_count":31,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4,"mirror_url":null,"open_issues_count":16,"forks":4,"open_issues":16,"watchers":31,"default_branch":"master"}},"base":{"label":"fjordllc:master","ref":"master","sha":"fc7744c1514d9342fe5a12f36909d0e3feb149b9","user":{"login":"fjordllc","id":1106666,"avatar_url":"https://avatars.githubusercontent.com/u/1106666?v=3","gravatar_id":"","url":"https://api.github.com/users/fjordllc","html_url":"https://github.com/fjordllc","followers_url":"https://api.github.com/users/fjordllc/followers","following_url":"https://api.github.com/users/fjordllc/following{/other_user}","gists_url":"https://api.github.com/users/fjordllc/gists{/gist_id}","starred_url":"https://api.github.com/users/fjordllc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fjordllc/subscriptions","organizations_url":"https://api.github.com/users/fjordllc/orgs","repos_url":"https://api.github.com/users/fjordllc/repos","events_url":"https://api.github.com/users/fjordllc/events{/privacy}","received_events_url":"https://api.github.com/users/fjordllc/received_events","type":"Organization","site_admin":false},"repo":{"id":5139175,"name":"interns","full_name":"fjordllc/interns","owner":{"login":"fjordllc","id":1106666,"avatar_url":"https://avatars.githubusercontent.com/u/1106666?v=3","gravatar_id":"","url":"https://api.github.com/users/fjordllc","html_url":"https://github.com/fjordllc","followers_url":"https://api.github.com/users/fjordllc/followers","following_url":"https://api.github.com/users/fjordllc/following{/other_user}","gists_url":"https://api.github.com/users/fjordllc/gists{/gist_id}","starred_url":"https://api.github.com/users/fjordllc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fjordllc/subscriptions","organizations_url":"https://api.github.com/users/fjordllc/orgs","repos_url":"https://api.github.com/users/fjordllc/repos","events_url":"https://api.github.com/users/fjordllc/events{/privacy}","received_events_url":"https://api.github.com/users/fjordllc/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/fjordllc/interns","description":"Interns and E-Learning Management System.","fork":false,"url":"https://api.github.com/repos/fjordllc/interns","forks_url":"https://api.github.com/repos/fjordllc/interns/forks","keys_url":"https://api.github.com/repos/fjordllc/interns/keys{/key_id}","collaborators_url":"https://api.github.com/repos/fjordllc/interns/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/fjordllc/interns/teams","hooks_url":"https://api.github.com/repos/fjordllc/interns/hooks","issue_events_url":"https://api.github.com/repos/fjordllc/interns/issues/events{/number}","events_url":"https://api.github.com/repos/fjordllc/interns/events","assignees_url":"https://api.github.com/repos/fjordllc/interns/assignees{/user}","branches_url":"https://api.github.com/repos/fjordllc/interns/branches{/branch}","tags_url":"https://api.github.com/repos/fjordllc/interns/tags","blobs_url":"https://api.github.com/repos/fjordllc/interns/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/fjordllc/interns/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/fjordllc/interns/git/refs{/sha}","trees_url":"https://api.github.com/repos/fjordllc/interns/git/trees{/sha}","statuses_url":"https://api.github.com/repos/fjordllc/interns/statuses/{sha}","languages_url":"https://api.github.com/repos/fjordllc/interns/languages","stargazers_url":"https://api.github.com/repos/fjordllc/interns/stargazers","contributors_url":"https://api.github.com/repos/fjordllc/interns/contributors","subscribers_url":"https://api.github.com/repos/fjordllc/interns/subscribers","subscription_url":"https://api.github.com/repos/fjordllc/interns/subscription","commits_url":"https://api.github.com/repos/fjordllc/interns/commits{/sha}","git_commits_url":"https://api.github.com/repos/fjordllc/interns/git/commits{/sha}","comments_url":"https://api.github.com/repos/fjordllc/interns/comments{/number}","issue_comment_url":"https://api.github.com/repos/fjordllc/interns/issues/comments{/number}","contents_url":"https://api.github.com/repos/fjordllc/interns/contents/{+path}","compare_url":"https://api.github.com/repos/fjordllc/interns/compare/{base}...{head}","merges_url":"https://api.github.com/repos/fjordllc/interns/merges","archive_url":"https://api.github.com/repos/fjordllc/interns/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/fjordllc/interns/downloads","issues_url":"https://api.github.com/repos/fjordllc/interns/issues{/number}","pulls_url":"https://api.github.com/repos/fjordllc/interns/pulls{/number}","milestones_url":"https://api.github.com/repos/fjordllc/interns/milestones{/number}","notifications_url":"https://api.github.com/repos/fjordllc/interns/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/fjordllc/interns/labels{/name}","releases_url":"https://api.github.com/repos/fjordllc/interns/releases{/id}","deployments_url":"https://api.github.com/repos/fjordllc/interns/deployments","created_at":"2012-07-22T04:59:57Z","updated_at":"2016-01-15T01:51:52Z","pushed_at":"2016-02-08T11:51:05Z","git_url":"git://github.com/fjordllc/interns.git","ssh_url":"git@github.com:fjordllc/interns.git","clone_url":"https://github.com/fjordllc/interns.git","svn_url":"https://github.com/fjordllc/interns","homepage":"","size":14831,"stargazers_count":31,"watchers_count":31,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4,"mirror_url":null,"open_issues_count":16,"forks":4,"open_issues":16,"watchers":31,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/fjordllc/interns/pulls/108"},"html":{"href":"https://github.com/fjordllc/interns/pull/108"},"issue":{"href":"https://api.github.com/repos/fjordllc/interns/issues/108"},"comments":{"href":"https://api.github.com/repos/fjordllc/interns/issues/108/comments"},"review_comments":{"href":"https://api.github.com/repos/fjordllc/interns/pulls/108/comments"},"review_comment":{"href":"https://api.github.com/repos/fjordllc/interns/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/fjordllc/interns/pulls/108/commits"},"statuses":{"href":"https://api.github.com/repos/fjordllc/interns/statuses/87904aaf5c94847dd8ecf3b78345c0488bba2f13"}}}}