From bb382a02677c2e92c106104ae989e21523673427 Mon Sep 17 00:00:00 2001 From: Konrad Malik Date: Wed, 1 Jan 2025 14:04:02 +0100 Subject: [PATCH] mise: add usage compatibility test --- pkgs/by-name/mi/mise/package.nix | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/pkgs/by-name/mi/mise/package.nix b/pkgs/by-name/mi/mise/package.nix index 976d1b9357bb58..343fc81b5f0586 100644 --- a/pkgs/by-name/mi/mise/package.nix +++ b/pkgs/by-name/mi/mise/package.nix @@ -16,6 +16,7 @@ usage, mise, testers, + runCommand, }: rustPlatform.buildRustPackage rec { @@ -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 = {