File: EdgeCaseBalanceTests.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-- 606 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 Various edge-cases around balancing when preferring to close
    Before each
        call autopairs#Variables#InitVariables()
        let g:AutoPairsPreferClose = 0
    End
    It should jump )(|) sanely
        new | only!
        call Expect(")()").ToMatch(")()")
    End
    It should close )(| sanely
        new | only!
        call Expect("()").ToMatch("()")
        call Expect(")(").ToMatch(")()")
    End
    It should handle quotes properly
        new | only!
        call Expect(" \"foo").ToMatch(" \"foo\"")
        call Expect(" \"foo\<esc>0i\"").ToMatch("\"\" \"foo\"")
    End
End