aboutsummaryrefslogtreecommitdiff
path: root/tests/functional/repl_characterization/data
diff options
context:
space:
mode:
authorJade Lovelace <lix@jade.fyi>2024-03-09 23:59:50 -0800
committerJade Lovelace <lix@jade.fyi>2024-03-14 14:30:38 -0700
commit38571c50e6dc0ee910e9e7619e482fdbbfd644e1 (patch)
tree2f1635b17b71ef3aa0ed3c8dac7bc9ffd2165d07 /tests/functional/repl_characterization/data
parent84727bebb42ded17c128567e34636c4cdc7eed45 (diff)
Implement a parser for a literate testing system for the repl
This parser can be reused for other purposes. It's inspired by https://bitheap.org/cram/ Although eelco's impostor exists https://github.com/mobusoperandi/eelco, it is not very nice to depend on out of tree testing frameworks with no way to customize them. Change-Id: Ifca50177e09730182baf0ebf829c3505bbb0274a
Diffstat (limited to 'tests/functional/repl_characterization/data')
-rw-r--r--tests/functional/repl_characterization/data/basic.ast11
-rw-r--r--tests/functional/repl_characterization/data/basic.test11
2 files changed, 22 insertions, 0 deletions
diff --git a/tests/functional/repl_characterization/data/basic.ast b/tests/functional/repl_characterization/data/basic.ast
new file mode 100644
index 000000000..d494b00aa
--- /dev/null
+++ b/tests/functional/repl_characterization/data/basic.ast
@@ -0,0 +1,11 @@
+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"
diff --git a/tests/functional/repl_characterization/data/basic.test b/tests/functional/repl_characterization/data/basic.test
new file mode 100644
index 000000000..d6b8427b4
--- /dev/null
+++ b/tests/functional/repl_characterization/data/basic.test
@@ -0,0 +1,11 @@
+meow meow meow
+ nix-repl> command
+ output output one
+
+
+ output output two
+meow meow
+ nix-repl> command two
+ output output output
+commentary
+ output output output