This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-08-08
Channels
- # announcements (43)
- # architecture (4)
- # beginners (115)
- # calva (6)
- # cider (4)
- # circleci (4)
- # clara (3)
- # clj-kondo (6)
- # cljs-dev (10)
- # cljsrn (1)
- # clojars (1)
- # clojure (108)
- # clojure-boston (1)
- # clojure-dev (4)
- # clojure-europe (5)
- # clojure-italy (6)
- # clojure-nl (13)
- # clojure-uk (17)
- # clojurescript (47)
- # core-async (2)
- # cursive (13)
- # data-science (1)
- # datavis (15)
- # datomic (12)
- # graphql (5)
- # juxt (10)
- # kaocha (20)
- # lumo (1)
- # off-topic (27)
- # pedestal (4)
- # reitit (2)
- # shadow-cljs (115)
- # spacemacs (4)
- # sql (74)
- # tools-deps (79)
- # vim (15)
- # xtdb (2)
The docs for kaocha.repl/run says that output is sent to stdout, but I'm not able to capture it.
(require 'kaocha.repl)
(with-out-str
(kaocha.repl/run)) ;; => ""
Any ideas? πnot off the top of my head @magnars, I'm guessing *out*
is being rebound more than once, maybe in the output capturing plugin. Does it work if you disable output capturing?
To give some context: I'm trying to make a kaocha plugin for Emacs, showing output in a separate buffer π
(defmacro with-test-out-str
[& body]
`(let [s# (new java.io.StringWriter)]
(binding [clojure.test/*test-out* s#]
~@body
(str s#))))
(with-test-out-str
(kaocha.repl/run))
@magnars this seems to do the trick, clojure test has its own *test-out*
var for this purposeExcellent, that did the trick. Now I have some fun emacs lisp coding to do in preparation for the next live stream. π