Permalink
Browse files

wip: move tests into their own directory, run them with script/test

  • Loading branch information...
1 parent bbe37dd commit 4d1bfbf6d35522cfc28a4f135b19949ce27d4f59 @stuarthalloway stuarthalloway committed Jul 29, 2011
View
@@ -0,0 +1,13 @@
+Definitely a work-in-progress.
+
+To run tests before you commit:
+
+ script/test
+
+To add tests:
+
+ * Create test fiels in the test/cljs directory.
+ * Write fns that throw an exception on failure.
+ * Call those fns from test/cljs/cljs/test_runner.cljs
+
+
View
@@ -1,3 +1,3 @@
#!/bin/sh
-java -server -Xmx2G -Xms2G -Xmn256m -cp 'lib/*:src/clj:src/cljs' clojure.main
+java -server -Xmx2G -Xms2G -Xmn256m -cp 'lib/*:src/clj:src/cljs:test/cljs' clojure.main
View
@@ -1,5 +1,5 @@
#!/bin/sh
-java -server -Xmx2G -Xms2G -Xmn256m -cp 'lib/*:src/clj:src/cljs' clojure.main -e \
+java -server -Xmx2G -Xms2G -Xmn256m -cp 'lib/*:src/clj:src/cljs:test/cljs' clojure.main -e \
"(require '[cljs.compiler :as comp])
(def jse (comp/repl-env))
(comp/repl jse)"
View
@@ -0,0 +1,14 @@
+mkdir -p out
+
+bin/cljsc test > out/core-test.js
+bin/cljsc test {:optimizations :advanced} > out/core-advanced-test.js
+
+if [ "$V8_HOME" == "" ]; then
+ echo "V8_HOME not set, skipping V8 tests"
+else
+ ${V8_HOME}/d8 out/core-advanced-test.js
+ # TODO: figure out path problem when not in advanced mode
+ # ${V8_HOME}/d8 out/core-test.js
+fi
+
+# TODO : run tests with rhino if available
Oops, something went wrong. Retry.

0 comments on commit 4d1bfbf

Please sign in to comment.