File: BalanceTests.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 (20 lines) | stat: -rw-r--r-- 583 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
Describe Balancing should be good
    Before each
        call autopairs#Variables#InitVariables()
    End
    It should balance pairs normally
        new | only!

        call Expect("(())").ToMatch("(())")
        call Expect("((\<BS>").ToMatch("())")
        call Expect("((\<BS>(").ToMatch("(())")
    End
    It shouldn't balance blacklisted open pairs
        let g:AutoPairsOpenBalanceBlacklist = ['(']
        new | only!

        call Expect("(())").ToMatch("(())")
        call Expect("((\<BS>").ToMatch("())")
        call Expect("((\<BS>(").ToMatch("(()))")
    End
End