aboutsummaryrefslogtreecommitdiff
path: root/tests/functional/repl_characterization/data/regression_9918.test
diff options
context:
space:
mode:
authorRebecca Turner <rbt@sent.as>2024-03-22 16:45:05 -0700
committerRebecca Turner <rbt@sent.as>2024-04-05 13:14:21 -0700
commitee423f391d33246801de86c73330c8442df09dc8 (patch)
treeb2be1785079e942098925f414d33848069779281 /tests/functional/repl_characterization/data/regression_9918.test
parent83d720b7304f6479f48dca8f3062e966f359e9b4 (diff)
Rewrite REPL test parser
- Use a recursive descent parser so that it's easy to extend. - Add `@args` to enable customizing command-line arguments - Add `@should-start` to enable `nix repl` tests that error before entering the REPL - Make sure to read all stdout output before comparing. This catches some extra output we were tossing out before! Change-Id: I5522555df4c313024ab15cd10f9f04e7293bda3a
Diffstat (limited to 'tests/functional/repl_characterization/data/regression_9918.test')
-rw-r--r--tests/functional/repl_characterization/data/regression_9918.test16
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/functional/repl_characterization/data/regression_9918.test b/tests/functional/repl_characterization/data/regression_9918.test
index c30c405b6..a85d6d33a 100644
--- a/tests/functional/repl_characterization/data/regression_9918.test
+++ b/tests/functional/repl_characterization/data/regression_9918.test
@@ -1,3 +1,4 @@
+@args --debugger
error:
… while evaluating the error message passed to builtin.throw
@@ -14,3 +15,18 @@ We expect to be able to see locals like r in the debugger:
Env level 1
abort baseNameOf break builtins derivation derivationStrict dirOf false fetchGit fetchMercurial fetchTarball fetchTree fromTOML import isNull map null placeholder removeAttrs scopedImport throw toString true
+
+ nix-repl> :quit
+ error:
+ … while evaluating the file '$TEST_DATA/regression_9918.nix':
+
+ … while calling the 'throw' builtin
+ at $TEST_DATA/regression_9918.nix:3:7:
+ 2| r = [];
+ 3| x = builtins.throw r;
+ | ^
+ 4| in
+
+ … while evaluating the error message passed to builtin.throw
+
+ error: cannot coerce a list to a string: [ ]