3
0
Fork 0
forked from mirrors/nixpkgs

dash: add test

This commit is contained in:
Christian Kampka 2022-01-17 12:17:55 +01:00
parent 1ea75adb02
commit ce00fa6d26
No known key found for this signature in database
GPG key ID: B88E140DB4FE1AA5

View file

@ -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
'';
};
};
}