File: Issue41RegressionTests.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 (34 lines) | stat: -rw-r--r-- 871 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
29
30
31
32
33
34
Describe Regression tests for issue #41

    Before each
        call autopairs#Variables#InitVariables()
        new | only!
    End
    It shouldn't be dumb with single quotes
        normal i 'foo
        call Expect("").CheckBuff(" 'foo'")
        normal 0i'
        call Expect("").CheckBuff("'' 'foo'")
    End
    It shouldn't be dumb with double quotes
        normal i "foo
        call Expect("").CheckBuff(' "foo"')
        normal 0i"
        call Expect("").CheckBuff('"" "foo"')
    End
    It should work in markdown
        new file.md | only!

        normal i 'foo
        call Expect("").CheckBuff(" 'foo'")
        normal a '
        call Expect("").CheckBuff(" 'foo '")
        normal 0i'
        call Expect("").CheckBuff("'' 'foo '")

        call Expect('"""').ToMatch('""""""')
        call Expect("```").ToMatch('``````')

        %d
    End
End