From 38571c50e6dc0ee910e9e7619e482fdbbfd644e1 Mon Sep 17 00:00:00 2001 From: Jade Lovelace Date: Sat, 9 Mar 2024 23:59:50 -0800 Subject: 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 --- tests/functional/repl_characterization/data/basic.ast | 11 +++++++++++ tests/functional/repl_characterization/data/basic.test | 11 +++++++++++ 2 files changed, 22 insertions(+) create mode 100644 tests/functional/repl_characterization/data/basic.ast create mode 100644 tests/functional/repl_characterization/data/basic.test (limited to 'tests/functional/repl_characterization/data') 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 -- cgit v1.2.3