fish-shell/tests/alias.in
Kurtis Rader f2c8e73891 add more alias unit tests
A recent regression to the `alias` command points out the need for more
unit tests of its behavior. I also decided to use it as an opportunity
to normalize the output of just `alias` to list aliases.
2017-07-15 17:36:36 -07:00

15 lines
474 B
Fish

# Avoid regressions of issue #3860 wherein the first word of the alias ends
# with a semicolon.
function foo
echo ran foo
end
alias my_alias "foo; and echo foo ran"
my_alias
alias a-2='echo "hello there"'
echo '# bare `alias` should list the aliases we have created and nothing else'
# We have to exclude two aliases because they're an artifact of the unit test
# framework and we can't predict the definition.
alias | grep -Ev '^alias (fish_indent|fish_key_reader) '