about summary refs log tree commit diff
path: root/pkgs/shells
diff options
context:
space:
mode:
authorPascal Bach <pascal.bach@nextrem.ch>2022-01-25 22:18:30 +0100
committerGitHub <noreply@github.com>2022-01-25 22:18:30 +0100
commit58c4bc989f70a323d66fc3d65ec645774350080c (patch)
tree8b376c8eb90a6ee97601b7ef87e43adf98083dd4 /pkgs/shells
parent4baaf48d4d18fe3e8860318413a2a0309191a9b3 (diff)
parentce00fa6d26ec7cb4647b82b72611b42ae1c49ed0 (diff)
Merge pull request #155362 from kampka/dash-test
dash: add test
Diffstat (limited to 'pkgs/shells')
-rw-r--r--pkgs/shells/dash/default.nix10
1 files changed, 10 insertions, 0 deletions
diff --git a/pkgs/shells/dash/default.nix b/pkgs/shells/dash/default.nix
index 2a0d731456076..a1f789dc3a330 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
+      '';
+    };
   };
 }