mise: add usage compatibility test (#369951)

This commit is contained in:
Konrad Malik
2025-01-24 13:49:49 +00:00
committed by GitHub
parent 7d413989e4
commit de0a829e5f
+26 -1
View File
@@ -16,6 +16,8 @@
usage,
mise,
testers,
runCommand,
jq,
}:
rustPlatform.buildRustPackage rec {
@@ -89,7 +91,30 @@ rustPlatform.buildRustPackage rec {
passthru = {
updateScript = nix-update-script { };
tests.version = testers.testVersion { package = mise; };
tests = {
version = testers.testVersion { package = mise; };
usageCompat =
# should not crash
runCommand "mise-usage-compatibility"
{
nativeBuildInputs = [
mise
usage
jq
];
}
''
export HOME=$(mktemp -d)
spec="$(mise usage)"
for shl in bash fish zsh; do
echo "testing $shl"
usage complete-word --shell $shl --spec "$spec"
done
touch $out
'';
};
};
meta = {