anta40
anta40

Reputation: 6743

How to run Clojure tests on Windows?

I put Clojure in C:\clojure-1.1.0, and start the REPL 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.

Upvotes: 1

Views: 219

Answers (2)

Sergey Miryanov
Sergey Miryanov

Reputation: 1830

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.

Upvotes: 0

G__
G__

Reputation: 7111

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)"

Upvotes: 2

Related Questions