]> git.madduck.net Git - etc/vim.git/blobdiff - test/toc-autofit.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:

Add support for strike through which is supported by GFM but not in
[etc/vim.git] / test / toc-autofit.vader
index 005a13f369e4d655e940ca17ee1e69e61a372e26..26789975625e637558419284dea59c9b13f58fac 100644 (file)
@@ -1,12 +1,5 @@
 " Tests toc window auto-fit to longest header, but without exceeding half screen.
 
-Before:
-  source ../after/ftplugin/markdown.vim
-
-After:
-  setlocal foldexpr=0
-  setlocal foldmethod=manual
-
 Given markdown;
 # chap 1
 
@@ -50,8 +43,11 @@ Execute (toc window autofit width):
   let line = '###### chap 12.1.1.1.1.1'
   AssertEqual getline('33'), line
   :Toc
+  let real_width = winwidth(0)
+  :lclose
   let expected_width = len(line) + 2*5 + 1 + 3 - 7
-  AssertEqual &winwidth, expected_width
+  AssertEqual real_width, expected_width
+  set nonumber
 " 2 spaces * 5 additional header levels + 1 space for first header +
 " 3 spaces for line numbers - 7 chars ('###### ') that don't show up on the TOC