]> git.madduck.net Git - etc/vim.git/commitdiff

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:

Fix toc-autofit test and travis build config
authorAlexandre Constantino <dreaming.about.electric.sheep@gmail.com>
Thu, 14 Jan 2016 21:11:07 +0000 (21:11 +0000)
committerAlexandre Constantino <dreaming.about.electric.sheep@gmail.com>
Thu, 14 Jan 2016 21:11:07 +0000 (21:11 +0000)
Because the toc-autofit test needs a reasonable terminal width (in our
case 80 will suffice) it sets the travis environment to use 80 columns,
as mentioned in https://github.com/travis-ci/travis-ci/issues/5407

.travis.yml
test/toc-autofit.vader

index a2bf9155d73b25b36c83900c44d71d933c1e73b9..fde06587e743fe7fbd8d21bb14be6d199f671805 100644 (file)
@@ -20,5 +20,7 @@ before_script: |
   sudo pip install virtualenv
 
 script:
+  - stty cols 80
+  - export COLUMNS=80
   - make test
   - make doc
index 005a13f369e4d655e940ca17ee1e69e61a372e26..166cc81618c0435bd849455a58bebddbae63517c 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,10 @@ Execute (toc window autofit width):
   let line = '###### chap 12.1.1.1.1.1'
   AssertEqual getline('33'), line
   :Toc
+  let real_width = &winwidth
+  :lclose
   let expected_width = len(line) + 2*5 + 1 + 3 - 7
-  AssertEqual &winwidth, expected_width
+  AssertEqual real_width, expected_width
 " 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