test-utilities: version test
Extract 'version test' to a reusable test utility as discussed in https://github.com/NixOS/nixpkgs/pull/119636#issuecomment-826137021 and
This commit is contained in:
@@ -1,4 +1,9 @@
|
||||
{ lib, stdenv, fetchurl }:
|
||||
{ lib
|
||||
, stdenv
|
||||
, fetchurl
|
||||
, testVersion
|
||||
, hello
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "hello";
|
||||
@@ -11,6 +16,9 @@ stdenv.mkDerivation rec {
|
||||
|
||||
doCheck = true;
|
||||
|
||||
passthru.tests.version =
|
||||
testVersion { package = hello; };
|
||||
|
||||
meta = with lib; {
|
||||
description = "A program that produces a familiar, friendly greeting";
|
||||
longDescription = ''
|
||||
|
||||
Reference in New Issue
Block a user