{"action":"created","comment":{"url":"https://api.github.com/repos/neovim/neovim/pulls/comments/30538570","id":30538570,"diff_hunk":"@@ -0,0 +1,105 @@\n+-- Tests for case-insensitive UTF-8 comparisons (utf_strnicmp() in mbyte.c)\n+-- Also test \"g~ap\".\n+\n+local helpers = require('test.functional.helpers')\n+local feed, insert, source = helpers.feed, helpers.insert, helpers.source\n+local clear, execute, expect = helpers.clear, helpers.execute, helpers.expect\n+\n+describe('82', function()\n+  setup(clear)\n+\n+  it('is working', function()\n+    execute('set enc=utf8')\n+    feed('ggdG<cr>')\n+    execute('function! Ch(a, op, b, expected)')\n+    execute([[  if eval(printf('\"%s\" %s \"%s\"', a:a, a:op, a:b)) != a:expected]])\n+    execute([[    call append(line('$'), printf('\"%s\" %s \"%s\" should return %d', a:a, a:op, a:b, a:expected))]])\n+    execute('  else')\n+    execute('    let b:passed += 1')\n+    execute('  endif')\n+    execute('endfunction')\n+    execute('function! Chk(a, b, result)')\n+    execute('  if a:result == 0')\n+    execute([[    call Ch(a:a, '==?', a:b, 1)]])\n+    execute([[    call Ch(a:a, '!=?', a:b, 0)]])\n+    execute([[    call Ch(a:a, '<=?', a:b, 1)]])\n+    execute([[    call Ch(a:a, '>=?', a:b, 1)]])\n+    execute([[    call Ch(a:a, '<?', a:b, 0)]])\n+    execute([[    call Ch(a:a, '>?', a:b, 0)]])\n+    execute('  elseif a:result > 0')\n+    execute([[    call Ch(a:a, '==?', a:b, 0)]])\n+    execute([[    call Ch(a:a, '!=?', a:b, 1)]])\n+    execute([[    call Ch(a:a, '<=?', a:b, 0)]])\n+    execute([[    call Ch(a:a, '>=?', a:b, 1)]])\n+    execute([[    call Ch(a:a, '<?', a:b, 0)]])\n+    execute([[    call Ch(a:a, '>?', a:b, 1)]])\n+    execute('  else')\n+    execute([[    call Ch(a:a, '==?', a:b, 0)]])\n+    execute([[    call Ch(a:a, '!=?', a:b, 1)]])\n+    execute([[    call Ch(a:a, '<=?', a:b, 1)]])\n+    execute([[    call Ch(a:a, '>=?', a:b, 0)]])\n+    execute([[    call Ch(a:a, '<?', a:b, 1)]])\n+    execute([[    call Ch(a:a, '>?', a:b, 0)]])\n+    execute('  endif')\n+    execute('endfunction')\n+    execute('function! Check(a, b, result)')\n+    execute('  call Chk(a:a, a:b, a:result)')\n+    execute('  call Chk(a:b, a:a, -a:result)')\n+    execute('endfunction')\n+    execute('function! LT(a, b)')\n+    execute('  call Check(a:a, a:b, -1)')\n+    execute('endfunction')\n+    execute('function! GT(a, b)')\n+    execute('  call Check(a:a, a:b, 1)')\n+    execute('endfunction')\n+    execute('function! EQ(a, b)')\n+    execute('  call Check(a:a, a:b, 0)')\n+    execute('endfunction')\n+    execute('let b:passed=0')\n+    execute([[call EQ('', '')]])\n+    execute([[call LT('', 'a')]])\n+    execute([[call EQ('abc', 'abc')]])\n+    execute([[call EQ('Abc', 'abC')]])\n+    execute([[call LT('ab', 'abc')]])\n+    execute([[call LT('AB', 'abc')]])\n+    execute([[call LT('ab', 'aBc')]])\n+    execute([[call EQ('\\xd0\\xb9\\xd1\\x86\\xd1\\x83\\xd0\\xba\\xd0\\xb5\\xd0\\xbd', '\\xd0\\xb9\\xd0\\xa6\\xd0\\xa3\\xd0\\xba\\xd0\\x95\\xd0\\xbd')]])\n+    execute([[call LT('\\xd0\\xb9\\xd1\\x86\\xd1\\x83\\xd0\\xba\\xd0\\xb5\\xd0\\xbd', '\\xd0\\xaf\\xd1\\x86\\xd1\\x83\\xd0\\xba\\xd0\\xb5\\xd0\\xbd')]])\n+    execute([[call EQ('\\xe2\\x84\\xaa', 'k')]])\n+    execute([[call LT('\\xe2\\x84\\xaa', 'kkkkkk')]])\n+    execute([[call EQ('\\xe2\\x84\\xaa\\xe2\\x84\\xaa\\xe2\\x84\\xaa', 'kkk')]])\n+    execute([[call LT('kk', '\\xe2\\x84\\xaa\\xe2\\x84\\xaa\\xe2\\x84\\xaa')]])\n+    execute([[call EQ('\\xe2\\x84\\xaa\\xe2\\x84\\xa6k\\xe2\\x84\\xaak\\xcf\\x89', 'k\\xcf\\x89\\xe2\\x84\\xaakk\\xe2\\x84\\xa6')]])\n+    execute([[call EQ('Abc\\x80', 'AbC\\x80')]])\n+    execute([[call LT('Abc\\x80', 'AbC\\x81')]])\n+    execute([[call LT('Abc', 'AbC\\x80')]])\n+    -- Case folding stops at the first bad character.\n+    execute([[call LT('abc\\x80DEF', 'abc\\x80def')]])\n+    execute([[call LT('\\xc3XYZ', '\\xc3xyz')]])\n+    -- FF3A (upper), FF5A (lower).\n+    execute([[call EQ('\\xef\\xbc\\xba', '\\xef\\xbd\\x9a')]])\n+    -- First string is ok and equals \\xef\\xbd\\x9a after folding, second string is illegal and was left unchanged, then the strings were bytewise compared.\n+    execute([[call GT('\\xef\\xbc\\xba', '\\xef\\xbc\\xff')]])\n+    execute([[call LT('\\xc3', '\\xc3\\x83')]])\n+    execute([[call EQ('\\xc3\\xa3xYz', '\\xc3\\x83XyZ')]])\n+    execute([[for n in range(0x60, 0xFF) | call LT(printf('xYz\\x%.2X', n-1), printf('XyZ\\x%.2X', n)) | endfor]])\n+    execute([[for n in range(0x80, 0xBF) | call EQ(printf('xYz\\xc2\\x%.2XUvW', n), printf('XyZ\\xc2\\x%.2XuVw', n)) | endfor]])\n+    execute([[for n in range(0xC0, 0xFF) | call LT(printf('xYz\\xc2\\x%.2XUvW', n), printf('XyZ\\xc2\\x%.2XuVw', n)) | endfor]])\n+    execute([[call append(0, printf('%d checks passed', b:passed))]])\n+\n+    -- Test that g~ap changes one paragraph only.\n+    execute('new')\n+    feed('iabcd<cr><cr>')\n+    feed('defg<esc>gg0g~ap:let lns = getline(1,3)<cr>')","path":"test/functional/legacy/082_spec.lua","position":93,"original_position":93,"commit_id":"845260bd6c6714b9ea112e1f72fed07770300eba","original_commit_id":"845260bd6c6714b9ea112e1f72fed07770300eba","user":{"login":"glts","id":1483271,"avatar_url":"https://avatars.githubusercontent.com/u/1483271?v=3","gravatar_id":"","url":"https://api.github.com/users/glts","html_url":"https://github.com/glts","followers_url":"https://api.github.com/users/glts/followers","following_url":"https://api.github.com/users/glts/following{/other_user}","gists_url":"https://api.github.com/users/glts/gists{/gist_id}","starred_url":"https://api.github.com/users/glts/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/glts/subscriptions","organizations_url":"https://api.github.com/users/glts/orgs","repos_url":"https://api.github.com/users/glts/repos","events_url":"https://api.github.com/users/glts/events{/privacy}","received_events_url":"https://api.github.com/users/glts/received_events","type":"User","site_admin":false},"body":"Personally I even break things like this apart to make it easier to read:\r\n\r\n    feed('defg<esc>gg0g~ap')\r\n    execute('let lns = getline(1,3)')\r\n\r\nBut it isn't necessary.","created_at":"2015-05-18T19:16:48Z","updated_at":"2015-05-18T19:16:48Z","html_url":"https://github.com/neovim/neovim/pull/2692#discussion_r30538570","pull_request_url":"https://api.github.com/repos/neovim/neovim/pulls/2692","_links":{"self":{"href":"https://api.github.com/repos/neovim/neovim/pulls/comments/30538570"},"html":{"href":"https://github.com/neovim/neovim/pull/2692#discussion_r30538570"},"pull_request":{"href":"https://api.github.com/repos/neovim/neovim/pulls/2692"}}},"pull_request":{"url":"https://api.github.com/repos/neovim/neovim/pulls/2692","id":35616283,"html_url":"https://github.com/neovim/neovim/pull/2692","diff_url":"https://github.com/neovim/neovim/pull/2692.diff","patch_url":"https://github.com/neovim/neovim/pull/2692.patch","issue_url":"https://api.github.com/repos/neovim/neovim/issues/2692","number":2692,"state":"open","locked":false,"title":"[RFC] Convert legacy test 82.","user":{"login":"lucc","id":1104419,"avatar_url":"https://avatars.githubusercontent.com/u/1104419?v=3","gravatar_id":"","url":"https://api.github.com/users/lucc","html_url":"https://github.com/lucc","followers_url":"https://api.github.com/users/lucc/followers","following_url":"https://api.github.com/users/lucc/following{/other_user}","gists_url":"https://api.github.com/users/lucc/gists{/gist_id}","starred_url":"https://api.github.com/users/lucc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lucc/subscriptions","organizations_url":"https://api.github.com/users/lucc/orgs","repos_url":"https://api.github.com/users/lucc/repos","events_url":"https://api.github.com/users/lucc/events{/privacy}","received_events_url":"https://api.github.com/users/lucc/received_events","type":"User","site_admin":false},"body":"I can squash the commits as soon as somebody has reviewed it.","created_at":"2015-05-18T09:33:11Z","updated_at":"2015-05-18T19:16:48Z","closed_at":null,"merged_at":null,"merge_commit_sha":"3ad99e682aacfe0eee746b7abf39b9507190daee","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/neovim/neovim/pulls/2692/commits","review_comments_url":"https://api.github.com/repos/neovim/neovim/pulls/2692/comments","review_comment_url":"https://api.github.com/repos/neovim/neovim/pulls/comments{/number}","comments_url":"https://api.github.com/repos/neovim/neovim/issues/2692/comments","statuses_url":"https://api.github.com/repos/neovim/neovim/statuses/845260bd6c6714b9ea112e1f72fed07770300eba","head":{"label":"lucc:test82","ref":"test82","sha":"845260bd6c6714b9ea112e1f72fed07770300eba","user":{"login":"lucc","id":1104419,"avatar_url":"https://avatars.githubusercontent.com/u/1104419?v=3","gravatar_id":"","url":"https://api.github.com/users/lucc","html_url":"https://github.com/lucc","followers_url":"https://api.github.com/users/lucc/followers","following_url":"https://api.github.com/users/lucc/following{/other_user}","gists_url":"https://api.github.com/users/lucc/gists{/gist_id}","starred_url":"https://api.github.com/users/lucc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lucc/subscriptions","organizations_url":"https://api.github.com/users/lucc/orgs","repos_url":"https://api.github.com/users/lucc/repos","events_url":"https://api.github.com/users/lucc/events{/privacy}","received_events_url":"https://api.github.com/users/lucc/received_events","type":"User","site_admin":false},"repo":{"id":35087368,"name":"neovim","full_name":"lucc/neovim","owner":{"login":"lucc","id":1104419,"avatar_url":"https://avatars.githubusercontent.com/u/1104419?v=3","gravatar_id":"","url":"https://api.github.com/users/lucc","html_url":"https://github.com/lucc","followers_url":"https://api.github.com/users/lucc/followers","following_url":"https://api.github.com/users/lucc/following{/other_user}","gists_url":"https://api.github.com/users/lucc/gists{/gist_id}","starred_url":"https://api.github.com/users/lucc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lucc/subscriptions","organizations_url":"https://api.github.com/users/lucc/orgs","repos_url":"https://api.github.com/users/lucc/repos","events_url":"https://api.github.com/users/lucc/events{/privacy}","received_events_url":"https://api.github.com/users/lucc/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/lucc/neovim","description":"ambitious Vim-fork focused on extensibility and agility. Please consider helping sustain Neovim development! https://salt.bountysource.com/teams/neovim","fork":true,"url":"https://api.github.com/repos/lucc/neovim","forks_url":"https://api.github.com/repos/lucc/neovim/forks","keys_url":"https://api.github.com/repos/lucc/neovim/keys{/key_id}","collaborators_url":"https://api.github.com/repos/lucc/neovim/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/lucc/neovim/teams","hooks_url":"https://api.github.com/repos/lucc/neovim/hooks","issue_events_url":"https://api.github.com/repos/lucc/neovim/issues/events{/number}","events_url":"https://api.github.com/repos/lucc/neovim/events","assignees_url":"https://api.github.com/repos/lucc/neovim/assignees{/user}","branches_url":"https://api.github.com/repos/lucc/neovim/branches{/branch}","tags_url":"https://api.github.com/repos/lucc/neovim/tags","blobs_url":"https://api.github.com/repos/lucc/neovim/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/lucc/neovim/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/lucc/neovim/git/refs{/sha}","trees_url":"https://api.github.com/repos/lucc/neovim/git/trees{/sha}","statuses_url":"https://api.github.com/repos/lucc/neovim/statuses/{sha}","languages_url":"https://api.github.com/repos/lucc/neovim/languages","stargazers_url":"https://api.github.com/repos/lucc/neovim/stargazers","contributors_url":"https://api.github.com/repos/lucc/neovim/contributors","subscribers_url":"https://api.github.com/repos/lucc/neovim/subscribers","subscription_url":"https://api.github.com/repos/lucc/neovim/subscription","commits_url":"https://api.github.com/repos/lucc/neovim/commits{/sha}","git_commits_url":"https://api.github.com/repos/lucc/neovim/git/commits{/sha}","comments_url":"https://api.github.com/repos/lucc/neovim/comments{/number}","issue_comment_url":"https://api.github.com/repos/lucc/neovim/issues/comments{/number}","contents_url":"https://api.github.com/repos/lucc/neovim/contents/{+path}","compare_url":"https://api.github.com/repos/lucc/neovim/compare/{base}...{head}","merges_url":"https://api.github.com/repos/lucc/neovim/merges","archive_url":"https://api.github.com/repos/lucc/neovim/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/lucc/neovim/downloads","issues_url":"https://api.github.com/repos/lucc/neovim/issues{/number}","pulls_url":"https://api.github.com/repos/lucc/neovim/pulls{/number}","milestones_url":"https://api.github.com/repos/lucc/neovim/milestones{/number}","notifications_url":"https://api.github.com/repos/lucc/neovim/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/lucc/neovim/labels{/name}","releases_url":"https://api.github.com/repos/lucc/neovim/releases{/id}","created_at":"2015-05-05T08:27:50Z","updated_at":"2015-05-05T08:27:56Z","pushed_at":"2015-05-18T13:02:53Z","git_url":"git://github.com/lucc/neovim.git","ssh_url":"git@github.com:lucc/neovim.git","clone_url":"https://github.com/lucc/neovim.git","svn_url":"https://github.com/lucc/neovim","homepage":"http://neovim.io","size":30582,"stargazers_count":0,"watchers_count":0,"language":"VimL","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":"neovim:master","ref":"master","sha":"1352725beb2e9a4f0374b612217defa88ad97320","user":{"login":"neovim","id":6471485,"avatar_url":"https://avatars.githubusercontent.com/u/6471485?v=3","gravatar_id":"","url":"https://api.github.com/users/neovim","html_url":"https://github.com/neovim","followers_url":"https://api.github.com/users/neovim/followers","following_url":"https://api.github.com/users/neovim/following{/other_user}","gists_url":"https://api.github.com/users/neovim/gists{/gist_id}","starred_url":"https://api.github.com/users/neovim/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/neovim/subscriptions","organizations_url":"https://api.github.com/users/neovim/orgs","repos_url":"https://api.github.com/users/neovim/repos","events_url":"https://api.github.com/users/neovim/events{/privacy}","received_events_url":"https://api.github.com/users/neovim/received_events","type":"Organization","site_admin":false},"repo":{"id":16408992,"name":"neovim","full_name":"neovim/neovim","owner":{"login":"neovim","id":6471485,"avatar_url":"https://avatars.githubusercontent.com/u/6471485?v=3","gravatar_id":"","url":"https://api.github.com/users/neovim","html_url":"https://github.com/neovim","followers_url":"https://api.github.com/users/neovim/followers","following_url":"https://api.github.com/users/neovim/following{/other_user}","gists_url":"https://api.github.com/users/neovim/gists{/gist_id}","starred_url":"https://api.github.com/users/neovim/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/neovim/subscriptions","organizations_url":"https://api.github.com/users/neovim/orgs","repos_url":"https://api.github.com/users/neovim/repos","events_url":"https://api.github.com/users/neovim/events{/privacy}","received_events_url":"https://api.github.com/users/neovim/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/neovim/neovim","description":"ambitious Vim-fork focused on extensibility and agility. Please consider helping sustain Neovim development! https://salt.bountysource.com/teams/neovim","fork":false,"url":"https://api.github.com/repos/neovim/neovim","forks_url":"https://api.github.com/repos/neovim/neovim/forks","keys_url":"https://api.github.com/repos/neovim/neovim/keys{/key_id}","collaborators_url":"https://api.github.com/repos/neovim/neovim/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/neovim/neovim/teams","hooks_url":"https://api.github.com/repos/neovim/neovim/hooks","issue_events_url":"https://api.github.com/repos/neovim/neovim/issues/events{/number}","events_url":"https://api.github.com/repos/neovim/neovim/events","assignees_url":"https://api.github.com/repos/neovim/neovim/assignees{/user}","branches_url":"https://api.github.com/repos/neovim/neovim/branches{/branch}","tags_url":"https://api.github.com/repos/neovim/neovim/tags","blobs_url":"https://api.github.com/repos/neovim/neovim/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/neovim/neovim/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/neovim/neovim/git/refs{/sha}","trees_url":"https://api.github.com/repos/neovim/neovim/git/trees{/sha}","statuses_url":"https://api.github.com/repos/neovim/neovim/statuses/{sha}","languages_url":"https://api.github.com/repos/neovim/neovim/languages","stargazers_url":"https://api.github.com/repos/neovim/neovim/stargazers","contributors_url":"https://api.github.com/repos/neovim/neovim/contributors","subscribers_url":"https://api.github.com/repos/neovim/neovim/subscribers","subscription_url":"https://api.github.com/repos/neovim/neovim/subscription","commits_url":"https://api.github.com/repos/neovim/neovim/commits{/sha}","git_commits_url":"https://api.github.com/repos/neovim/neovim/git/commits{/sha}","comments_url":"https://api.github.com/repos/neovim/neovim/comments{/number}","issue_comment_url":"https://api.github.com/repos/neovim/neovim/issues/comments{/number}","contents_url":"https://api.github.com/repos/neovim/neovim/contents/{+path}","compare_url":"https://api.github.com/repos/neovim/neovim/compare/{base}...{head}","merges_url":"https://api.github.com/repos/neovim/neovim/merges","archive_url":"https://api.github.com/repos/neovim/neovim/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/neovim/neovim/downloads","issues_url":"https://api.github.com/repos/neovim/neovim/issues{/number}","pulls_url":"https://api.github.com/repos/neovim/neovim/pulls{/number}","milestones_url":"https://api.github.com/repos/neovim/neovim/milestones{/number}","notifications_url":"https://api.github.com/repos/neovim/neovim/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/neovim/neovim/labels{/name}","releases_url":"https://api.github.com/repos/neovim/neovim/releases{/id}","created_at":"2014-01-31T13:39:22Z","updated_at":"2015-05-18T18:51:38Z","pushed_at":"2015-05-18T17:07:41Z","git_url":"git://github.com/neovim/neovim.git","ssh_url":"git@github.com:neovim/neovim.git","clone_url":"https://github.com/neovim/neovim.git","svn_url":"https://github.com/neovim/neovim","homepage":"http://neovim.io","size":79876,"stargazers_count":13371,"watchers_count":13371,"language":"VimL","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":913,"mirror_url":null,"open_issues_count":488,"forks":913,"open_issues":488,"watchers":13371,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/neovim/neovim/pulls/2692"},"html":{"href":"https://github.com/neovim/neovim/pull/2692"},"issue":{"href":"https://api.github.com/repos/neovim/neovim/issues/2692"},"comments":{"href":"https://api.github.com/repos/neovim/neovim/issues/2692/comments"},"review_comments":{"href":"https://api.github.com/repos/neovim/neovim/pulls/2692/comments"},"review_comment":{"href":"https://api.github.com/repos/neovim/neovim/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/neovim/neovim/pulls/2692/commits"},"statuses":{"href":"https://api.github.com/repos/neovim/neovim/statuses/845260bd6c6714b9ea112e1f72fed07770300eba"}}}}