]> git.madduck.net Git - etc/vim.git/blobdiff - test/map.vader

madduck's git repository

Every one of the projects in this repository is available at the canonical URL git://git.madduck.net/madduck/pub/<projectpath> — see each project's metadata for the exact URL.

All patches and comments are welcome. Please squash your changes to logical commits before using git-format-patch and git-send-email to patches@git.madduck.net. If you'd read over the Git project's submission guidelines and adhered to them, I'd be especially grateful.

SSH access, as well as push access can be individually arranged.

If you use my repositories frequently, consider adding the following snippet to ~/.gitconfig and using the third clone URL listed for each project:

[url "git://git.madduck.net/madduck/"]
  insteadOf = madduck:

Update Markdown_GetUrlForPosition function b: to s:
[etc/vim.git] / test / map.vader
index 51bde78b4e12bde8d98518347b84d3f85e726ee2..ea96182088c3489a03c005f282134e14eef5da43 100644 (file)
@@ -4,11 +4,12 @@ a <http://b> c
 Execute (gx autolink):
   let b:url = 'http://b'
   let b:line = getline(1)
-  AssertEqual b:Markdown_GetUrlForPosition(1, match(b:line, 'a') + 1), ''
-  AssertEqual b:Markdown_GetUrlForPosition(1, match(b:line, '<') + 1), b:url
-  AssertEqual b:Markdown_GetUrlForPosition(1, match(b:line, 'h') + 1), b:url
-  AssertEqual b:Markdown_GetUrlForPosition(1, match(b:line, '>') + 1), b:url
-  AssertEqual b:Markdown_GetUrlForPosition(1, match(b:line, 'c') + 1), ''
+  let b:func = Markdown_GetFunc('vim-markdown/ftplugin/mkd.vim', 'Markdown_GetUrlForPosition')
+  AssertEqual b:func(1, match(b:line, 'a') + 1), ''
+  AssertEqual b:func(1, match(b:line, '<') + 1), b:url
+  AssertEqual b:func(1, match(b:line, 'h') + 1), b:url
+  AssertEqual b:func(1, match(b:line, '>') + 1), b:url
+  AssertEqual b:func(1, match(b:line, 'c') + 1), ''
 
 Given mkd;
 a http://b.bb c
@@ -16,9 +17,10 @@ a http://b.bb c
 Execute (gx implicit autolink):
   let b:url = 'http://b.bb'
   let b:line = getline(1)
-  AssertEqual b:Markdown_GetUrlForPosition(1, match(b:line, 'a') + 1), ''
-  AssertEqual b:Markdown_GetUrlForPosition(1, match(b:line, 'h') + 1), b:url
-  AssertEqual b:Markdown_GetUrlForPosition(1, match(b:line, 'c') + 1), ''
+  let b:func = Markdown_GetFunc('vim-markdown/ftplugin/mkd.vim', 'Markdown_GetUrlForPosition')
+  AssertEqual b:func(1, match(b:line, 'a') + 1), ''
+  AssertEqual b:func(1, match(b:line, 'h') + 1), b:url
+  AssertEqual b:func(1, match(b:line, 'c') + 1), ''
 
 Given mkd;
 [a]: http://b "c"
@@ -26,10 +28,11 @@ Given mkd;
 Execute (gx link reference definition):
   let b:url = 'http://b'
   let b:line = getline(1)
+  let b:func = Markdown_GetFunc('vim-markdown/ftplugin/mkd.vim', 'Markdown_GetUrlForPosition')
   " TODO would be cool if all of the following gave the link.
-  AssertEqual b:Markdown_GetUrlForPosition(1, match(b:line, 'a') + 1), ''
-  AssertEqual b:Markdown_GetUrlForPosition(1, match(b:line, 'h') + 1), b:url
-  AssertEqual b:Markdown_GetUrlForPosition(1, match(b:line, 'c') + 1), ''
+  AssertEqual b:func(1, match(b:line, 'a') + 1), ''
+  AssertEqual b:func(1, match(b:line, 'h') + 1), b:url
+  AssertEqual b:func(1, match(b:line, 'c') + 1), ''
 
 Given mkd;
 a [b](c) d
@@ -37,14 +40,15 @@ a [b](c) d
 Execute (gx autolink):
   let b:url = 'c'
   let b:line = getline(1)
-  AssertEqual b:Markdown_GetUrlForPosition(1, match(b:line, 'a') + 1), ''
-  AssertEqual b:Markdown_GetUrlForPosition(1, match(b:line, '[') + 1), b:url
-  AssertEqual b:Markdown_GetUrlForPosition(1, match(b:line, 'b') + 1), b:url
-  AssertEqual b:Markdown_GetUrlForPosition(1, match(b:line, ']') + 1), b:url
-  AssertEqual b:Markdown_GetUrlForPosition(1, match(b:line, '(') + 1), b:url
-  AssertEqual b:Markdown_GetUrlForPosition(1, match(b:line, 'c') + 1), b:url
-  AssertEqual b:Markdown_GetUrlForPosition(1, match(b:line, ')') + 1), b:url
-  AssertEqual b:Markdown_GetUrlForPosition(1, match(b:line, 'd') + 1), ''
+  let b:func = Markdown_GetFunc('vim-markdown/ftplugin/mkd.vim', 'Markdown_GetUrlForPosition')
+  AssertEqual b:func(1, match(b:line, 'a') + 1), ''
+  AssertEqual b:func(1, match(b:line, '[') + 1), b:url
+  AssertEqual b:func(1, match(b:line, 'b') + 1), b:url
+  AssertEqual b:func(1, match(b:line, ']') + 1), b:url
+  AssertEqual b:func(1, match(b:line, '(') + 1), b:url
+  AssertEqual b:func(1, match(b:line, 'c') + 1), b:url
+  AssertEqual b:func(1, match(b:line, ')') + 1), b:url
+  AssertEqual b:func(1, match(b:line, 'd') + 1), ''
 
 Given mkd;
 # a