babashka/script/lib_tests/spartan_spec_test

18 lines
478 B
Text
Raw Normal View History

2020-01-07 08:33:37 +00:00
#!/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)
2020-02-19 22:58:49 +00:00
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\"]))
2020-01-07 08:33:37 +00:00
"