Merge pull request #155362 from kampka/dash-test

dash: add test
This commit is contained in:
Pascal Bach 2022-01-25 22:18:30 +01:00 committed by GitHub
commit 58c4bc989f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -5,6 +5,8 @@
, fetchurl , fetchurl
, fetchpatch , fetchpatch
, libedit , libedit
, runCommand
, dash
}: }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
@ -52,5 +54,13 @@ stdenv.mkDerivation rec {
passthru = { passthru = {
shellPath = "/bin/dash"; 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
'';
};
}; };
} }