nix/tests/functional/debugger.sh
2024-06-20 14:54:11 +02:00

16 lines
381 B
Bash
Executable File

#!/usr/bin/env bash
source common.sh
clearStoreIfPossible
# regression #9932
echo ":env" | expect 1 nix eval --debugger --expr '(_: throw "oh snap") 42'
echo ":env" | expect 1 nix eval --debugger --expr '
let x.a = 1; in
with x;
(_: builtins.seq x.a (throw "oh snap")) x.a
' >debugger-test-out
grep -P 'with: .*a' debugger-test-out
grep -P 'static: .*x' debugger-test-out