#!/usr/bin/env bash

mise i dummy@1.0.0

assert_contains "mise use dummy" "dummy@1.0.0"
assert "mise current dummy" "1.0.0"

assert_contains "mise use dummy@2" "dummy@2."
assert "mise current dummy" "2.0.0"

assert_not_contains "mise use --rm dummy" "dummy"
assert "mise current dummy" ""

assert_contains "mise use --env local dummy@2" "dummy@2."
assert "cat .mise.local.toml" '[tools]
dummy = "2"'
assert "mise current dummy" "2.0.0"
