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:
@@ -1,16 +1,27 @@
|
||||
Commentary "meow meow meow"
|
||||
Command "command"
|
||||
Output "output output one"
|
||||
Output ""
|
||||
Output ""
|
||||
Output "output output two"
|
||||
Commentary "meow meow"
|
||||
Command "command two"
|
||||
Output "output output output"
|
||||
Commentary "commentary"
|
||||
Output "output output output"
|
||||
Output ""
|
||||
Commentary "the blank below should be chomped"
|
||||
Command "command three"
|
||||
Commentary ""
|
||||
Output "meow output"
|
||||
Commentary: "meow meow meow"
|
||||
Indent: " "
|
||||
Prompt: "nix-repl> "
|
||||
Command: "command"
|
||||
Indent: " "
|
||||
Output: "output output one"
|
||||
Output: ""
|
||||
Commentary: ""
|
||||
Indent: " "
|
||||
Output: "output output two"
|
||||
Commentary: "meow meow"
|
||||
Indent: " "
|
||||
Prompt: "nix-repl> "
|
||||
Command: "command two"
|
||||
Indent: " "
|
||||
Output: "output output output"
|
||||
Commentary: "commentary"
|
||||
Indent: " "
|
||||
Output: "output output output"
|
||||
Output: ""
|
||||
Commentary: "the blank below should be chomped"
|
||||
Indent: " "
|
||||
Prompt: "nix-repl> "
|
||||
Command: "command three"
|
||||
Commentary: ""
|
||||
Indent: " "
|
||||
Output: "meow output"
|
||||
|
||||
Reference in New Issue
Block a user