Add test for regression

This commit is contained in:
Michiel Borkent 2023-04-21 16:39:00 +02:00
parent 0951328270
commit c1726c3b98
3 changed files with 19 additions and 1 deletions

View file

@ -1,5 +1,7 @@
#!/usr/bin/env bash
set -eo pipefail
if [ "$GRAALVM_HOME" != "" ]
then
export JAVA_HOME=$GRAALVM_HOME
@ -8,7 +10,6 @@ fi
java -version
set -eo pipefail
unset BABASHKA_PRELOADS
unset BABASHKA_CLASSPATH
unset BABASHKA_PRELOADS_TEST
@ -40,3 +41,12 @@ lein test :only babashka.pod-test
export BABASHKA_SOCKET_REPL_TEST=true
lein test :only babashka.impl.socket-repl-test
# test invoking script in subdir with bb.edn in parent dir
unset BABASHKA_PRELOADS
pushd test-resources/bb_in_root_script_in_other_dir
if [[ $BABASHKA_TEST_ENV = "native" ]]
then
../../bb dir/script.clj
fi
popd

View file

@ -0,0 +1,2 @@
{:deps {medley/medley {:mvn/version "1.3.0"}}}

View file

@ -0,0 +1,6 @@
#!/usr/bin/env bb
(ns script
(:require [medley.core :as medley]))
(prn (medley/index-by :id [{:id 1}]))