---
source: tests/feature_tests/aliases.rs
expression: "&source.trim()"
---
set -e
eval "$(fnm env)"
fnm install 6.11.3
fnm install 8.11.3
fnm alias 8.11 oldie
fnm alias 6 older
fnm default older
fnm ls | grep 8.11.3 | grep oldie
fnm ls | grep 6.11.3 | grep older | grep default
fnm use older
if [ "$(node -v)" != "v6.11.3" ]; then
    echo 'Expected Node version to be "v6.11.3", Got: '"$(node -v)"
    exit 1
fi

fnm use oldie
if [ "$(node -v)" != "v8.11.3" ]; then
    echo 'Expected Node version to be "v8.11.3", Got: '"$(node -v)"
    exit 1
fi

fnm use default
if [ "$(node -v)" != "v6.11.3" ]; then
    echo 'Expected Node version to be "v6.11.3", Got: '"$(node -v)"
    exit 1
fi
