File: EscapeTests.vimspec

package info (click to toggle)
vim-autopairs 4.2.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 444 kB
  • sloc: makefile: 4
file content (28 lines) | stat: -rw-r--r-- 855 bytes parent folder | download | duplicates (2)
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
Describe Backslashes are trash, but
    Before each
        call autopairs#Variables#InitVariables()
    End
    It should escape correctly
        new | only!
        call Expect('\[').ToMatch('\[')
        call Expect('\{').ToMatch('\{')
        call Expect('\(').ToMatch('\(')
        call Expect('\"').ToMatch('\"')
    End
    It the option to not enable escaping should work
        let g:AutoPairsSearchEscape = 0
        new | only!
        call Expect('\[').ToMatch('\[]')
        call Expect('\"').ToMatch('\""')
        call Expect('\(').ToMatch('\()')
        call Expect('\{').ToMatch('\{}')

    End
    It should handle double escaping
        new | only!
        call Expect('\\[').ToMatch('\\[]')
        call Expect('\\(').ToMatch('\\()')
        call Expect('\\"').ToMatch('\\""')
        call Expect('\\{').ToMatch('\\{}')
    End
End