-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy path.themisrc
36 lines (29 loc) · 1.17 KB
/
.themisrc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
let s:expect = themis#helper('expect')
let g:CachePairs = autopairs#AutoPairsDefine({})
let g:AutoPairsForceDefine = 69420
let g:Assert = themis#helper("assert")
" Some plugin apparently changes the tex filetype
" to plaintex, which breaks stuff:tm:
" This ensures it doesn't
let g:tex_flavor = 'latex'
syntax on
filetype plugin indent on
set noswapfile
" We have to set this to make sure indent-sensitive checks work as expected.
" This is largely just to make sure indent changes don't break working tests
set expandtab
set sw=2
" Not sure why I have to use a function to forward, but okay
fun! Expect(input)
return s:expect(a:input)
endfun
fun! CheckBuffImpl(input, output)
return join(getline(1, '$'), '\n') ==# a:output
endfun
fun! ToMatchImpl(input, output)
%d " Clear the file
execute 'normal i' . a:input
return join(getline(1, '$'), '\n') ==# a:output
endfun
call themis#helper#expect#define_matcher('CheckBuff', function('CheckBuffImpl'), '"Expected:\n" . a:2 . "\nActual:\n". join(getline(1, ''$''), ''\n'')')
call themis#helper#expect#define_matcher('ToMatch', function('ToMatchImpl'), '"Expected:\n" . a:2 . "\nActual:\n". join(getline(1, ''$''), ''\n'')')