espup: simplify version tester

This commit is contained in:
Daniel Nagy 2023-09-27 10:45:00 +02:00
parent 3c584440af
commit 2d55b6196b
No known key found for this signature in database
GPG key ID: 1B8E8DCB576FB671

View file

@ -9,7 +9,7 @@
, zstd
, stdenv
, darwin
, runCommand
, testers
, espup
}:
@ -62,15 +62,8 @@ rustPlatform.buildRustPackage rec {
--zsh <($out/bin/espup completions zsh)
'';
passthru.tests = {
simple = runCommand "${pname}-test" { } ''
if [[ `${espup}/bin/espup --version` != *"${version}"* ]]; then
echo "Error: program version does not match package version"
exit 1
fi
touch $out
'';
passthru.tests.version = testers.testVersion {
package = espup;
};
meta = with lib; {