Created
February 22, 2016 16:27
-
-
Save arrdem/3e4fe82a583368dc9d83 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
if [ ! -f `which lein` ]; | |
then | |
echo "Install leiningen from https://github.com/technomancy/leiningen" | |
exit | |
else | |
ROOT=`mktemp -d` | |
cd $ROOT | |
cat <<EOF > $ROOT/project.clj | |
(defproject test "0.0.0" | |
:dependencies [[me.arrdem/clojarr "1.9.0-e3f38f1-SNAPSHOT"]]) | |
EOF | |
cat <<EOF | lein repl | |
;; just make some defs | |
(ns foo) | |
(def a 1) | |
(def b 2) | |
;; reset (reload) the ns | |
(ns foo) | |
;; refresh one def | |
(def a 1) | |
;; b hasn't been refreshed, should warn | |
foo/b | |
(in-ns 'user) | |
;; this should work | |
foo/a | |
;; this should warn | |
foo/b | |
;; these should work | |
(defn af [] foo/a) | |
(af) | |
;; these should warn | |
(defn bf [] foo/b) | |
(bf) | |
EOF | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment