Add test harness: setup lib, dev mode, automated test runner

This commit is contained in:
2026-03-04 22:00:59 +00:00
parent f8aed56faf
commit 448e27ed8e
4 changed files with 217 additions and 0 deletions

21
Makefile Normal file
View File

@@ -0,0 +1,21 @@
SHELL := /bin/bash
CC := cc
CFLAGS := -Wall -O2
TARGET := fa2json
SRCS := fs-watcher.c json-writer.c
.PHONY: all test dev clean
all: $(TARGET)
$(TARGET): $(SRCS)
$(CC) $(CFLAGS) -o $@ $^
test: $(TARGET)
node test/test.mjs
dev: $(TARGET)
node test/dev.mjs $(ARGS)
clean:
rm -f $(TARGET)