From ce00fa6d26ec7cb4647b82b72611b42ae1c49ed0 Mon Sep 17 00:00:00 2001 From: Christian Kampka Date: Mon, 17 Jan 2022 12:17:55 +0100 Subject: [PATCH] dash: add test --- pkgs/shells/dash/default.nix | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/pkgs/shells/dash/default.nix b/pkgs/shells/dash/default.nix index 2a0d73145607..a1f789dc3a33 100644 --- a/pkgs/shells/dash/default.nix +++ b/pkgs/shells/dash/default.nix @@ -5,6 +5,8 @@ , fetchurl , fetchpatch , libedit +, runCommand +, dash }: stdenv.mkDerivation rec { @@ -52,5 +54,13 @@ stdenv.mkDerivation rec { passthru = { shellPath = "/bin/dash"; + tests = { + "execute-simple-command" = runCommand "${pname}-execute-simple-command" { } '' + mkdir $out + ${dash}/bin/dash -c 'echo "Hello World!" > $out/success' + [ -s $out/success ] + grep -q "Hello World" $out/success + ''; + }; }; }