-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix abbreviation expansion for abbreviations with pairs
- Loading branch information
1 parent
2b85d48
commit 4ee4028
Showing
3 changed files
with
41 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
Describe Abbreviations should work with weird stuff | ||
Before each | ||
call autopairs#Variables#InitVariables() | ||
End | ||
After each | ||
abclear | ||
End | ||
It should work with pairs at the start [#93] | ||
new | only! | ||
abbr (a Test | ||
|
||
call Expect("(a").ToMatch("Test)") | ||
call Expect("(a ").ToMatch("Test )") | ||
End | ||
It should work with pairs at the end [#93] | ||
new | only! | ||
abbr a( Test | ||
|
||
" I don't understand why the previous test doesn't need a trigger, | ||
" but this one does. Really weird and inconsistent behaviour, | ||
" and I wasn't able to reproduce this with my config (and I don't use | ||
" abbreviations, so all that shit should be default) | ||
call Expect("a( ").ToMatch("Test )") | ||
End | ||
It should work with balanced pairs in the middle [#93] | ||
new | only! | ||
" Not sure why these need to be balanced to keep abbr from throwing an | ||
" E474 | ||
abbr a(b) Test | ||
|
||
call Expect("a(b) ").ToMatch("Test ") | ||
End | ||
End |