Clean up tests with setUp and tearDown functions

This commit is contained in:
Eric Freese 2016-03-15 09:05:55 -06:00
commit ba7109169d
4 changed files with 46 additions and 3 deletions

View file

@ -6,6 +6,16 @@ oneTimeSetUp() {
source_autosuggestions
}
setUp() {
BUFFER=''
POSTDISPLAY=''
CURSOR=0
}
tearDown() {
restore _zsh_autosuggest_invoke_original_widget
}
testCursorMovesOutOfBuffer() {
BUFFER='ec'
POSTDISPLAY='ho hello'