Permalink
Browse files

changes so we can test ClojureScript

  • Loading branch information...
swannodette committed Feb 15, 2013
1 parent cbcc6e5 commit 42228d04111faa4666352a21dbba475329d6c7c0
Showing with 41 additions and 3 deletions.
  1. +13 −3 project.clj
  2. +26 −0 script/test
  3. +2 −0 src/test/cljs/clojure/core/match/js/tests.cljs
View
@@ -9,6 +9,16 @@
:test-paths ["src/test/clojure"]
:source-paths ["src/main/clojure"]
- :dependencies [[org.clojure/clojure "1.4.0"]]
- :dev-dependencies [[lein-swank "1.4.4"]
- [lein-cljsbuild "0.2.9"]])
+ :dependencies [[org.clojure/clojure "1.4.0"]
+ [org.clojure/clojurescript "0.0-1576"]]
+ :dev-dependencies [[nrepl "0.2.1"]]
@cemerick

cemerick Feb 15, 2013

Member

FYI, you'll need [org.clojure/tools.nrepl "xxx"] if you're trying to pull in clojure/tools.nrepl.

+ :plugins [[lein-cljsbuild "0.3.0"]]
+
+ :cljsbuild
+ {:builds
+ [{:test ["src/test/cljs/clojure/core/match/js/"],
+ :id "test",
+ :compiler {:output-js "test.js", :optimizations :simple}}
+ {:test ["src/test/cljs/clojure/core/match/js/"],
+ :id "test-adv",
+ :compiler {:output-js "test-adv.js", :optimizations :advanced}}]})
View
@@ -0,0 +1,26 @@
+rm -rf out
+mkdir -p out
+
+lein cljsbuild clean
+lein cljsbuild once
+
+if [ "$V8_HOME" == "" ]; then
+ echo "V8_HOME not set, skipping V8 tests"
+else
+ echo "Testing with V8"
+ ${V8_HOME}/d8 tests.js
+fi
+
+if [ "$SPIDERMONKEY_HOME" == "" ]; then
+ echo "SPIDERMONKEY_HOME not set, skipping SpiderMonkey tests"
+else
+ echo "Testing with SpiderMonkey"
+ ${SPIDERMONKEY_HOME}/js tests.js
+fi
+
+if [ "$JSC_HOME" == "" ]; then
+ echo "JSC_HOME not set, skipping JavaScriptCore tests"
+else
+ echo "Testing with JavaScriptCore"
+ ${JSC_HOME}/jsc tests.js
+fi
@@ -0,0 +1,2 @@
+(ns clojure.core.match.js.tests
+ (:require-macros [clojure.core.match.js :only [match]]))

0 comments on commit 42228d0

Please sign in to comment.