diff options
author | Sebastian Ullrich <sebasti@nullri.ch> | 2020-11-09 17:57:39 +0100 |
---|---|---|
committer | Sebastian Ullrich <sebasti@nullri.ch> | 2020-11-09 22:43:14 +0100 |
commit | 3f24a417dacd5a5964f781f4d704a5253401d380 (patch) | |
tree | 52a26f068f5dc9becb93bb17c98e39ee53e14143 | |
parent | 579b953231599f111dcc9fac95491458c9f6ef08 (diff) |
Add test case for incidentally fixed #4228
-rw-r--r-- | tests/nix-shell.sh | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/tests/nix-shell.sh b/tests/nix-shell.sh index 3b000a049..7b2be650a 100644 --- a/tests/nix-shell.sh +++ b/tests/nix-shell.sh @@ -58,9 +58,13 @@ output=$($TEST_ROOT/shell.shebang.rb abc ruby) # Test 'nix develop'. nix develop -f shell.nix shellDrv -c bash -c '[[ -n $stdenv ]]' -# Preserve stdin with `-c` + +# Ensure `nix develop -c` preserves stdin echo foo | nix develop -f shell.nix shellDrv -c cat | grep -q foo +# Ensure `nix develop -c` actually executes the command if stdout isn't a terminal +nix develop -f shell.nix shellDrv -c echo foo |& grep -q foo + # Test 'nix print-dev-env'. source <(nix print-dev-env -f shell.nix shellDrv) [[ -n $stdenv ]] |