Skip to content

Commit

Permalink
mise: add usage compatibility test
Browse files Browse the repository at this point in the history
  • Loading branch information
konradmalik committed Jan 1, 2025
1 parent b9a8d4c commit bb382a0
Showing 1 changed file with 20 additions and 1 deletion.
21 changes: 20 additions & 1 deletion pkgs/by-name/mi/mise/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
usage,
mise,
testers,
runCommand,
}:

rustPlatform.buildRustPackage rec {
Expand Down Expand Up @@ -89,7 +90,25 @@ 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
];
}
''
spec="$(mise usage)"
for shl in bash fish zsh; do
echo "testing $shl"
usage complete-word --shell $shl --spec "$spec"
done
'';
};
};

meta = {
Expand Down

0 comments on commit bb382a0

Please sign in to comment.