aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2021-07-09 12:10:48 +0200
committerEelco Dolstra <edolstra@gmail.com>2021-07-09 12:10:48 +0200
commit86fb01c4bee0c4f451504c0f6fd2066d2adc8fc2 (patch)
tree4647b85f2dafa8a4c357fd3613c31ffeb578f6aa /tests
parent223e0569ff2c93d8a907188b40d1928d6967e91f (diff)
nix print-dev-env: Add --json flag
Diffstat (limited to 'tests')
-rw-r--r--tests/nix-shell.sh2
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/nix-shell.sh b/tests/nix-shell.sh
index ec43db349..f60102f9c 100644
--- a/tests/nix-shell.sh
+++ b/tests/nix-shell.sh
@@ -96,6 +96,8 @@ echo foo | nix develop -f shell.nix shellDrv -c cat | grep -q foo
nix_develop -f shell.nix shellDrv -c echo foo |& grep -q foo
# Test 'nix print-dev-env'.
+[[ $(nix print-dev-env -f shell.nix shellDrv --json | jq -r .variables.arr1.value[2]) = '3 4' ]]
+
source <(nix print-dev-env -f shell.nix shellDrv)
[[ -n $stdenv ]]
[[ ${arr1[2]} = "3 4" ]]