mirror of
https://github.com/nmattia/snack.git
synced 2024-09-11 11:55:36 +03:00
21 lines
416 B
Bash
Executable File
21 lines
416 B
Bash
Executable File
#!/usr/bin/env bash
|
|
# vim: ft=sh sw=2 et
|
|
|
|
set -euo pipefail
|
|
|
|
test() {
|
|
TMP_FILE=$(mktemp)
|
|
|
|
cat $($SNACK build) | jq -M '.[0] | .result | keys' > $TMP_FILE
|
|
|
|
diff golden.jq $TMP_FILE
|
|
|
|
capture_io "$TMP_FILE" 'main (Baz 5)'| $SNACK ghci
|
|
diff golden $TMP_FILE
|
|
rm $TMP_FILE
|
|
}
|
|
|
|
SNACK="snack" test
|
|
SNACK="snack --package-file ./package.nix" test
|
|
# Note: no HPack test, because HPack doesn't support multi library
|