diff options
author | eldritch horrors <pennae@lix.systems> | 2024-03-04 08:57:44 +0100 |
---|---|---|
committer | eldritch horrors <pennae@lix.systems> | 2024-03-04 08:57:44 +0100 |
commit | 647d762ab59b40f7bd1503e4018d3325ffe4924e (patch) | |
tree | abadcc3dd31ed0c917d024c0f185227581a11151 /tests | |
parent | 542a19104e5a8146284f50aae9740ca2ada5ed1e (diff) |
Merge pull request #9933 from pennae/debugger-fix
fix debugger crashing while printing envs
(cherry picked from commit 9b8b4860913afdb7f9cb1e1e81f9a9dd192cd1c1)
Change-Id: Ica6a17e4b3e3b8b8093719f442c28be7f13be09d
Diffstat (limited to 'tests')
-rw-r--r-- | tests/functional/debugger.sh | 13 | ||||
-rw-r--r-- | tests/functional/local.mk | 3 |
2 files changed, 15 insertions, 1 deletions
diff --git a/tests/functional/debugger.sh b/tests/functional/debugger.sh new file mode 100644 index 000000000..63d88cbf3 --- /dev/null +++ b/tests/functional/debugger.sh @@ -0,0 +1,13 @@ +source common.sh + +clearStore + +# 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 diff --git a/tests/functional/local.mk b/tests/functional/local.mk index 24d772cc7..9f50a6dcc 100644 --- a/tests/functional/local.mk +++ b/tests/functional/local.mk @@ -122,7 +122,8 @@ nix_tests = \ path-from-hash-part.sh \ toString-path.sh \ read-only-store.sh \ - nested-sandboxing.sh + nested-sandboxing.sh \ + debugger.sh ifeq ($(HAVE_LIBCPUID), 1) nix_tests += compute-levels.sh |