Skip to content

Commit 506b76e

Browse files
committed
Add basic vader unittests + travis configuration
1 parent 08d82b2 commit 506b76e

5 files changed

Lines changed: 21 additions & 9 deletions

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
tags
22
a.*
3+
vader.vim

.travis.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
language: vim
2+
3+
before_script: |
4+
git clone https://github.com/junegunn/vader.vim.git
5+
6+
script: |
7+
# Will return 1 in case of errors - 0 otherwise
8+
vim -Nu test/vimrc -c 'Vader! test/*'

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,3 +167,4 @@ this or other vim plugins
167167
- [x] Turn supported languages into a table - what do we support in which
168168
language
169169
- [x] Make vim-repeat dependency optional
170+
- [] Have .vader test filetypes use the same function as standard vim files

test/basic.vader

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,24 +10,25 @@ Include: env_setup.vader
1010

1111
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1212

13+
""
14+
" Standard usecase, buffer with some text
1315
Execute (C +std_debug +Text):
1416
:set filetype=c
1517
3
1618
AssertEqual getline('.'), 'And each in your season', "Current line contents don't match"
1719
:normal ,ds
1820
:normal .
1921

20-
Log join(getline(1,'$'), "\n")
21-
2222
Then ():
2323
4
24-
Log join(getline(1,'$'), "\n")
25-
AssertEqual getline('.'), 'printf("[[Vader-workbench]:4] DEBUGGING STRING ==> 0\n");'
24+
AssertEqual getline('.'), 'printf("[[Vader-workbench]:4] DEBUGGING STRING ==> %d\n", 0);'
2625
6
27-
AssertEqual getline('.'), 'printf("[[Vader-workbench]:6] DEBUGGING STRING ==> 1\n");'
26+
AssertEqual getline('.'), 'printf("[[Vader-workbench]:6] DEBUGGING STRING ==> %d\n", 1);'
2827

2928
================================================================================
3029

30+
""
31+
" What happens if there isn't any text at all in the buffer?
3132
Execute (C +std_debug -Text):
3233
:set filetype=c
3334
8
@@ -36,7 +37,7 @@ Execute (C +std_debug -Text):
3637

3738
Then ():
3839
8
39-
AssertEqual getline('.'), 'printf("[[Vader-workbench]:8] DEBUGGING STRING ==> 0\n");'
40+
AssertEqual getline('.'), 'printf("[[Vader-workbench]:8] DEBUGGING STRING ==> %d\n", 0);'
4041

4142
================================================================================
4243

test/vimrc

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
filetype off
2-
let mapleader = ","
2+
let g:mapleader = ","
33

4-
set runtimepath+=~/.vim/bundle/vader.vim
5-
set runtimepath+=~/.vim/bundle/vim-debugstring
4+
set runtimepath+=.
5+
set runtimepath+=vader.vim
6+
set runtimepath+=after
67
set runtimepath+=~/.vim/bundle/vim-repeat
78

89
filetype plugin indent on

0 commit comments

Comments
 (0)