#!/usr/bin/env bash

assert "mise use dummy@2.0.0 tiny@2.0.0"
assert "mise use dummy@3.0.0 tiny@3.0.0"
cd "$(mktemp -d)" || exit 1 # mise should not prune these files even though they're from some other directory

assert_contains "mise prune --dry-run 2>&1" "mise dummy@2.0.0 [dryrun]"
assert_contains "mise prune --dry-run 2>&1" "mise tiny@2.0.0 [dryrun]"
assert "ls $MISE_DATA_DIR/installs/dummy/2.0.0"
assert "ls $MISE_DATA_DIR/installs/tiny/2.0.0"
assert "mise prune tiny"
assert "ls $MISE_DATA_DIR/installs/dummy/2.0.0"
assert_fail "ls $MISE_DATA_DIR/installs/tiny/2.0.0"
assert "mise prune"
assert_fail "ls $MISE_DATA_DIR/installs/dummy/2.0.0"
assert "ls $MISE_DATA_DIR/installs/dummy/3.0.0"
assert "ls $MISE_DATA_DIR/installs/tiny/3.0.0"
