nandi/clonimpublic Fork 0
main
Commits
Clone
git clone https://git.rickub.com/nandi/clonim.git
git clone ssh://git@rickub.com/nandi/clonim.git

Host key fingerprint (ed25519): SHA256:iycHnxEyq0Q7uyVpB7JlznP0G7JrTPXLYRcAU5CSLhc — verify it before your first connect.

run-tests.sh · 18 lines · 507 BBash Blame HistoryRaw
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
#!/usr/bin/env bash
# Compile and run every example, diffing against tests/<name>.expected
set -u
cd "$(dirname "$0")"
nim c --hints:off --warnings:off -o:bin/clonim src/clonim.nim || exit 1
fail=0
for f in examples/*.clj; do
  name=$(basename "$f" .clj)
  exp="tests/$name.expected"
  [ -f "$exp" ] || continue
  got=$(./bin/clonim run "$f" 2>&1)
  if [ "$got" = "$(cat "$exp")" ]; then
    echo "ok   $name"
  else
    echo "FAIL $name"; diff <(echo "$got") "$exp" | head -20; fail=1
  fi
done
exit $fail