L
ling-wallet
↓ 0 downloadsLing Wallet: a post-quantum privacy-coin wallet, full node and HyperTorus miner for LNG
Keywords wallet, cryptocurrency, lng, node, miner, ling
lingfu install ling-walletCode / Files (116)
ling/tests/crypto/run_errors.sh
#!/usr/bin/env bash
# Each errors/eNN.ling must stop with a runtime error (never "NOT REACHED",
# never a panic). Usage: run_errors.sh path/to/ling.exe
LING="${1:-ling}"
cd "$(dirname "$0")/errors" || exit 2
pass=0; fail=0
for f in e*.ling; do
out="$("$LING" run --interp "$f" 2>&1)"
if echo "$out" | grep -q "error\[runtime\]" && ! echo "$out" | grep -q "NOT REACHED\|panicked"; then
pass=$((pass+1)); echo "PASS $f: $(echo "$out" | grep -m1 'error\[runtime\]')"
else
fail=$((fail+1)); echo "FAIL $f: $(echo "$out" | head -3 | tr '\n' ' ')"
fi
done
echo "errors: $pass passed, $fail failed"
[ "$fail" -eq 0 ]