From 5596f879b43c20e5115d7bf9fddb70cdeec78988 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Thu, 2 Jul 2020 18:32:45 +0200 Subject: [PATCH] Add test for nix develop --- tests/nix-shell.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tests/nix-shell.sh b/tests/nix-shell.sh index 235e2a5ff..2ed40068a 100644 --- a/tests/nix-shell.sh +++ b/tests/nix-shell.sh @@ -55,3 +55,10 @@ chmod a+rx $TEST_ROOT/shell.shebang.rb output=$($TEST_ROOT/shell.shebang.rb abc ruby) [ "$output" = '-e load("'"$TEST_ROOT"'/shell.shebang.rb") -- abc ruby' ] + +# Test 'nix develop'. +nix develop -f shell.nix shellDrv -c sh -c '[[ -n $stdenv ]]' + +# Test 'nix print-dev-env'. +source <(nix print-dev-env -f shell.nix shellDrv) +[[ -n $stdenv ]]