fish-shell/tests/abbr.err
Kurtis Rader 17dff8c569 rewrite abbr function
Rewrite the `abbr` function to store each abbreviation in a separate
variable. This greatly improves the efficiency. For the common case
it is 5x faster. For pathological cases it is upwards of 100x faster.
Most people should be able to unconditionally define abbreviations in
their config.fish without a noticable slow down.

Fixes #4048
2017-08-03 14:35:06 -07:00

22 lines
999 B
Text

# Test basic add and list of __abbr1
# Erasing one that doesn't exist should do nothing
abbr --erase: No abbreviation named NOT_AN_ABBR
# Adding existing __abbr1 should be idempotent
# Replacing __abbr1 definition
# __abbr1 -s and --show tests
# Test erasing __abbr1
# Ensure we escape special characters on output
# Ensure we handle leading dashes in abbreviation names properly
# Test that an abbr word containing spaces is rejected
abbr --add: Abbreviation 'a b c' cannot have spaces in the word
# Test renaming
# Test renaming a nonexistent abbreviation
abbr --rename: No abbreviation named __abbr6
# Test renaming to a abbreviation with spaces
abbr --rename: Abbreviation 'g h i' cannot have spaces in the word
# Test renaming without arguments
abbr --rename: Requires exactly two arguments
# Test renaming with too many arguments
abbr --rename: Requires exactly two arguments
# Test renaming to existing abbreviation
abbr --rename: Abbreviation __abbr12 already exists, cannot rename __abbr11