commit ce009f2c7babb8c8c3608474c5d0bcb2b3c51976
parent 0e103a673c82cba3190d5a78a60aa1ff25670003
Author: Daniel Barlow <dan@telent.net>
Date: Wed, 21 Dec 2022 15:23:57 +0000
improve test harness
use overmind and entr to run tests whenever files change
Diffstat:
4 files changed, 24 insertions(+), 3 deletions(-)
diff --git a/Procfile b/Procfile
@@ -0,0 +1,2 @@
+repl: fennel
+test: find . | entr sh test/run.sh
+\ No newline at end of file
diff --git a/doc/index.html b/doc/index.html
@@ -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>
diff --git a/shell.nix b/shell.nix
@@ -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;
})
diff --git a/test/run.sh b/test/run.sh
@@ -0,0 +1,4 @@
+#!/usr/bin/env sh
+for i in test/*.fnl; do
+ fennel --correlate $i && echo $i OK
+done