.PHONY: test unit fat32 browser

test: unit fat32

unit:
	cd .. && node scripts/test-web.mjs

fat32:
	node generate-fat32-fixture.mjs
	mdir -i ../_scratch/test-fat32.img :: >/dev/null
	mdir -i ../_scratch/test-fat32.img ::/Test >/dev/null
	mdir -i ../_scratch/test-fat32.img ::/Books >/dev/null
	test "$$(mtype -i ../_scratch/test-fat32.img ::/Test/example.txt)" = "hello from OPFS"
	test "$$(mtype -i ../_scratch/test-fat32.img '::/Books/A long book filename.txt')" = "chapter one"

browser:
	./run-browser-raw-sd.sh
