---
source: tests/feature_tests/mod.rs
expression: "&source.trim()"
---
set -e
eval "$(fnm env)"
echo v8.10.0 > .nvmrc
fnm install
fnm install v6.10.0
fnm install v10.10.0
if [ "$(fnm exec -- node -v)" != "v8.10.0" ]; then
    echo 'Expected version file exec to be "v8.10.0", Got: '"$(fnm exec -- node -v)"
    exit 1
fi

if [ "$(fnm exec --using=6 -- node -v)" != "v6.10.0" ]; then
    echo 'Expected exec:6 node -v to be "v6.10.0", Got: '"$(fnm exec --using=6 -- node -v)"
    exit 1
fi

if [ "$(fnm exec --using=10 -- node -v)" != "v10.10.0" ]; then
    echo 'Expected exec:6 node -v to be "v10.10.0", Got: '"$(fnm exec --using=10 -- node -v)"
    exit 1
fi
