作为clojure的新手,我使用leiningen创建了一个示例项目
lein new app first-project
Run Code Online (Sandbox Code Playgroud)
这给了我这个目录
.
??? doc
? ??? intro.md
??? LICENSE
??? project.clj
??? README.md
??? resources
??? src
? ??? first_project
? ??? core.clj
??? target
? ??? repl
? ??? classes
? ??? stale
? ??? extract-native.dependencies
??? test
??? first_project
??? core_test.clj
Run Code Online (Sandbox Code Playgroud)
在不修改任何文件的情况下,我可以成功地完成唯一的失败测试
lein test
...
Ran 1 tests containing 1 assertions.
1 failures, 0 errors.
Tests failed.
Run Code Online (Sandbox Code Playgroud)
但是我无法使用运行测试从REPL做同样的事情
lein repl
first-project.core=> (use 'clojure.test)
nil
first-project.core=> (run-tests)
Testing first-project.core
Ran 0 tests containing 0 …Run Code Online (Sandbox Code Playgroud)