开发者

How to run Clojure tests on Windows?

开发者 https://www.devze.com 2022-12-30 11:24 出处:网络
I put Clojure in C:\\clojure-1.1.0, and start the REP开发者_StackOverflowL by: java -cp clojure.jar clojure.main

I put Clojure in C:\clojure-1.1.0, and start the REP开发者_StackOverflowL by: java -cp clojure.jar clojure.main

In \test\clojure\test_clojure, there are a bunch of test files. How to run these?

For example, I tried: java -cp ......\clojure.jar clojure.main data_structures.clj

And it didn't work.


Two choices:

  1. Once the REPL starts you can manually load the file with:

    (load-file "\data_structures.clj")

  2. You can pass a command-line option telling it to load/eval a file upon boot:

    java -cp clojure.jar clojure.main -i \data_structures.clj -e "(do-stuff)"


We use (clojure 1.2): java -cp "./target/***-0.1-jar-with-dependencies.jar;src/clojure" jline.ConsoleRunner clojure.main run.clj

I think with tests you can use similar way.

0

精彩评论

暂无评论...
验证码 换一张
取 消