mirror of
https://github.com/nmattia/snack.git
synced 2025-01-07 13:47:09 +03:00
22 lines
341 B
Bash
Executable File
22 lines
341 B
Bash
Executable File
#!/usr/bin/env bash
|
|
# vim: ft=sh sw=2 et
|
|
|
|
set -euo pipefail
|
|
|
|
|
|
test() {
|
|
$SNACK build
|
|
$SNACK run | diff golden -
|
|
|
|
TMP_FILE=$(mktemp)
|
|
|
|
capture_io "$TMP_FILE" main | $SNACK ghci
|
|
|
|
diff golden $TMP_FILE
|
|
rm $TMP_FILE
|
|
}
|
|
|
|
SNACK="snack -j4" test
|
|
SNACK="snack -j4 -s ./package.nix" test
|
|
SNACK="snack -j4 --package-yaml ./package.yaml" test
|