diff options
Diffstat (limited to 'clojure')
| -rw-r--r-- | clojure/Makefile | 11 | ||||
| -rw-r--r-- | clojure/tests/step9_interop.mal | 17 |
2 files changed, 18 insertions, 10 deletions
diff --git a/clojure/Makefile b/clojure/Makefile index 376d107..2ddfbcc 100644 --- a/clojure/Makefile +++ b/clojure/Makefile @@ -1,21 +1,12 @@ - -TESTS = - SOURCES_BASE = src/readline.clj src/reader.clj src/printer.clj SOURCES_LISP = src/env.clj src/core.clj src/stepA_more.clj SOURCES = $(SOURCES_BASE) $(SOURCES_LISP) all: -.PHONY: stats tests $(TESTS) +.PHONY: stats stats: $(SOURCES) @wc $^ stats-lisp: $(SOURCES_LISP) @wc $^ - -tests: $(TESTS) - -$(TESTS): - @echo "Running $@"; \ - lein with-profile XXX$@XXX trampoline run || exit 1; \ diff --git a/clojure/tests/step9_interop.mal b/clojure/tests/step9_interop.mal new file mode 100644 index 0000000..b323222 --- /dev/null +++ b/clojure/tests/step9_interop.mal @@ -0,0 +1,17 @@ +;; Testing basic clojure interop + +(clj* "7") +;=>7 + +(clj* "\"abc\"") +;=>"abc" + +(clj* "{\"abc\" 123}") +;=>{"abc" 123} + +(clj* "(prn \"foo\")") +; "foo" +;=>nil + +(clj* "(for [x [1 2 3]] (+ 1 x))") +;=>(2 3 4) |
