2017-08-04 12:25:20 +08:00
|
|
|
|
|
|
|
####################
|
2017-05-22 13:22:55 +08:00
|
|
|
# Test basic add and list of __abbr1
|
|
|
|
abbr -a -U -- __abbr1 'alpha beta gamma'
|
2017-08-04 12:25:20 +08:00
|
|
|
|
|
|
|
####################
|
2017-05-22 13:22:55 +08:00
|
|
|
# Erasing one that doesn't exist should do nothing
|
|
|
|
abbr -a -U -- __abbr1 'alpha beta gamma'
|
2017-08-04 12:25:20 +08:00
|
|
|
|
|
|
|
####################
|
2017-05-22 13:22:55 +08:00
|
|
|
# Adding existing __abbr1 should be idempotent
|
|
|
|
abbr -a -U -- __abbr1 'alpha beta gamma'
|
2017-08-04 12:25:20 +08:00
|
|
|
|
|
|
|
####################
|
2017-05-22 13:22:55 +08:00
|
|
|
# Replacing __abbr1 definition
|
|
|
|
abbr -a -U -- __abbr1 delta
|
2017-08-04 12:25:20 +08:00
|
|
|
|
|
|
|
####################
|
2017-05-22 13:22:55 +08:00
|
|
|
# __abbr1 -s and --show tests
|
|
|
|
abbr -a -U -- __abbr1 delta
|
|
|
|
abbr -a -U -- __abbr1 delta
|
2017-08-04 12:25:20 +08:00
|
|
|
|
|
|
|
####################
|
2017-05-22 13:22:55 +08:00
|
|
|
# Test erasing __abbr1
|
2017-08-04 12:25:20 +08:00
|
|
|
|
|
|
|
####################
|
2017-05-22 13:22:55 +08:00
|
|
|
# Ensure we escape special characters on output
|
|
|
|
abbr -a -U -- '~__abbr2' '$xyz'
|
2017-08-04 12:25:20 +08:00
|
|
|
|
|
|
|
####################
|
2017-05-22 13:22:55 +08:00
|
|
|
# Ensure we handle leading dashes in abbreviation names properly
|
|
|
|
abbr -a -U -- --__abbr3 xyz
|
2017-08-04 12:25:20 +08:00
|
|
|
|
|
|
|
####################
|
2017-05-22 13:22:55 +08:00
|
|
|
# Test that an abbr word containing spaces is rejected
|
2017-08-04 12:25:20 +08:00
|
|
|
|
|
|
|
####################
|
2017-05-22 13:22:55 +08:00
|
|
|
# Test renaming
|
|
|
|
abbr -a -U -- __abbr5 omega
|
2017-08-04 12:25:20 +08:00
|
|
|
|
|
|
|
####################
|
2017-05-22 13:22:55 +08:00
|
|
|
# Test renaming a nonexistent abbreviation
|
2017-08-04 12:25:20 +08:00
|
|
|
|
|
|
|
####################
|
2017-05-22 13:22:55 +08:00
|
|
|
# Test renaming to a abbreviation with spaces
|
2017-08-04 12:25:20 +08:00
|
|
|
|
|
|
|
####################
|
2017-05-22 13:22:55 +08:00
|
|
|
# Test renaming without arguments
|
2017-08-04 12:25:20 +08:00
|
|
|
|
|
|
|
####################
|
2017-05-22 13:22:55 +08:00
|
|
|
# Test renaming with too many arguments
|
|
|
|
abbr -a -U -- __abbr8 omega
|
2017-08-04 12:25:20 +08:00
|
|
|
|
|
|
|
####################
|
2017-05-22 13:22:55 +08:00
|
|
|
# Test renaming to existing abbreviation
|