babashka/script/lib_tests/spartan_spec_test
Michiel Borkent 7ad6f3195f Lib tests
2020-02-19 23:58:58 +01:00

17 lines
478 B
Bash
Executable file

#!/usr/bin/env bash
set -eo pipefail
export BABASHKA_CLASSPATH=$(clojure -Sdeps '{:deps {spartan.spec {:git/url "https://github.com/borkdude/spartan.spec" :sha "16f7eec4b6589c77c96c9fcf989f78fffcee7c4c"}}}' -Spath)
if [ "$BABASHKA_TEST_ENV" = "native" ]; then
BB_CMD="./bb"
else
BB_CMD="lein bb"
fi
$BB_CMD -e "
(time (require '[spartan.spec :as s]))
(time (s/explain (s/cat :i int? :s string?) [1 :foo]))
(time (s/conform (s/cat :i int? :s string?) [1 \"foo\"]))
"