about summary refs log tree commit diff
path: root/tests/shell.nix
diff options
context:
space:
mode:
authorSamuel Dionne-Riel <samuel@dionne-riel.com>2018-04-08T04·45-0400
committerSamuel Dionne-Riel <samuel@dionne-riel.com>2018-04-08T04·45-0400
commit9478f886810b8db87b7ebfe14343f77159c86a24 (patch)
tree9ffff18948b25ac7149589dcac4e131c58492f9e /tests/shell.nix
parent399f43c3d5fe91db3a2d6968d8ec30a4d6fbf285 (diff)
Adds `nix-shell` test for special-cased ruby interpreter.
The test fakes the interpreter only to verify the arguments it would be
given.
Diffstat (limited to 'tests/shell.nix')
-rw-r--r--tests/shell.nix7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/shell.nix b/tests/shell.nix
index 5845d36fc1..eb39f9039a 100644
--- a/tests/shell.nix
+++ b/tests/shell.nix
@@ -45,5 +45,12 @@ let pkgs = rec {
 
   bash = shell;
 
+  # ruby "interpreter" that outputs "$@"
+  ruby = runCommand "ruby" {} ''
+    mkdir -p $out/bin
+    echo 'printf -- "$*"' > $out/bin/ruby
+    chmod a+rx $out/bin/ruby
+  '';
+
   inherit pkgs;
 }; in pkgs