improve test harness

use overmind and entr to run tests whenever files change
main
Daniel Barlow 2022-12-21 15:23:57 +00:00
parent 0e103a673c
commit ce009f2c7b
4 changed files with 23 additions and 3 deletions

2
Procfile Normal file
View File

@ -0,0 +1,2 @@
repl: fennel
test: find . | entr sh test/run.sh

View File

@ -17,10 +17,20 @@
</body>
<h2>Features</h2>
Dunlin is a GTK-based Webkit browser which can be extended in
(indeed, is mostly written in) Fennel.
<h2>Hacking</h2>
<pre>
$ nix-shell
nix-shell$ overmind start -D
nix-shell$ overmind connect
</pre>
This starts a fennel interpreter and a test runner in tmux windows.
Use <pre>C-b n</pre> to switch between them or <pre>C-b d</pre>
to detach.
</html>

View File

@ -1,6 +1,10 @@
with import <nixpkgs> {} ;
let just = callPackage ./. {};
in just.overrideAttrs(o: {
nativeBuildInputs = o.nativeBuildInputs ++ [ pkgs.socat ];
nativeBuildInputs = o.nativeBuildInputs ++ (with pkgs; [
socat
overmind
entr
]);
JUST_HACKING = 1;
})

4
test/run.sh Normal file
View File

@ -0,0 +1,4 @@
#!/usr/bin/env sh
for i in test/*.fnl; do
fennel --correlate $i && echo $i OK
done