-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
45 additions
and
0 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
File renamed without changes.
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,44 @@ | ||
source (string join "/" (dirname (status --current-filename)) "common.fish") | ||
|
||
# Test that plugin update reset tip keys | ||
|
||
setup | ||
|
||
@test "plugin update __ABBR_TIPS_KEYS length" ( | ||
set len_keys (count $__ABBR_TIPS_KEYS) | ||
set -a __ABBR_TIPS_KEYS __wrong_key | ||
__abbr_tips_update | ||
test (count $__ABBR_TIPS_KEYS) -eq $len_keys | ||
) "$status" = 0 | ||
|
||
setup | ||
|
||
@test "plugin update __ABBR_TIPS_KEYS value" ( | ||
set last_key "$__ABBR_TIPS_KEYS[-1]" | ||
set -a __ABBR_TIPS_KEYS __wrong_key | ||
__abbr_tips_update | ||
test "$__ABBR_TIPS_KEYS[-1]" = "$last_key" | ||
) "$status" = 0 | ||
|
||
setup | ||
|
||
# Test that plugin update reset tip values | ||
|
||
@test "plugin update __ABBR_TIPS_VALUES length" ( | ||
set len_keys (count $__ABBR_TIPS_VALUES) | ||
set -a __ABBR_TIPS_VALUES __wrong_key | ||
__abbr_tips_update | ||
test (count $__ABBR_TIPS_VALUES) -eq $len_keys | ||
) "$status" = 0 | ||
|
||
setup | ||
|
||
@test "plugin update __ABBR_TIPS_VALUES value" ( | ||
set last_key "$__ABBR_TIPS_VALUES[-1]" | ||
set -a __ABBR_TIPS_VALUES __wrong_key | ||
__abbr_tips_update | ||
test "$__ABBR_TIPS_VALUES[-1]" = "$last_key" | ||
) "$status" = 0 | ||
|
||
|
||
teardown |