#!/bin/sh -e

# SPDX-FileCopyrightText: Chris Pressey, the original author of this work, has dedicated it to the public domain.
# For more information, please refer to <https://unlicense.org/>
# SPDX-License-Identifier: Unlicense

(cd src && LUA_PATH="?.lua" lua test_decoy.lua) > /tmp/decoy-test-output.txt
falderal doc/Decoy.md doc/Lists.md
# TODO: fold.scm
for F in greater.scm cosmos-boulders.scm; do
  echo ./bin/decoy compile -I lib/ -m stdenv "eg/$F"
  ./bin/decoy compile -I lib/ -m stdenv "eg/$F" >out.mjs
  ls -lh *.mjs
  node out.mjs
done
rm -f out.mjs
