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
This commit is contained in:
Rebecca Turner
2024-04-05 13:14:21 -07:00
parent 83d720b730
commit ee423f391d
15 changed files with 856 additions and 419 deletions
@@ -1,3 +1,4 @@
@args --debugger
we enter a debugger via builtins.break in the input file.
info: breakpoint reached
@@ -37,3 +38,4 @@ and once again, more breakpoints are ignored.
nix-repl> builtins.break 3
3
error: bar