Add test for regression
This commit is contained in:
parent
0951328270
commit
c1726c3b98
3 changed files with 19 additions and 1 deletions
12
script/test
12
script/test
|
|
@ -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
|
||||
|
|
|
|||
2
test-resources/bb_in_root_script_in_other_dir/bb.edn
Normal file
2
test-resources/bb_in_root_script_in_other_dir/bb.edn
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
{:deps {medley/medley {:mvn/version "1.3.0"}}}
|
||||
|
||||
6
test-resources/bb_in_root_script_in_other_dir/dir/script.clj
Executable file
6
test-resources/bb_in_root_script_in_other_dir/dir/script.clj
Executable file
|
|
@ -0,0 +1,6 @@
|
|||
#!/usr/bin/env bb
|
||||
|
||||
(ns script
|
||||
(:require [medley.core :as medley]))
|
||||
|
||||
(prn (medley/index-by :id [{:id 1}]))
|
||||
Loading…
Reference in a new issue