在测试时,我注意到当我使用 prepl 评估代码的某些警告时,测试只会通过一次然后就会失败。警告在每个会话中只发出一次
$ clojure -X clojure.core.server/start-server :name prepl :port 7777 :accept clojure.core.server/io-prepl :server-daemon false &
$ nc localhost 7777
(defn identity [x] x)
{:tag :ret, :val "#'user/identity", :ns "user", :ms 1, :form "(defn identity [x] x)"}
(binding [*out* *err*] (flush))
{:tag :err, :val "WARNING: identity already refers to: #'clojure.core/identity in namespace: user, being replaced by: #'user/identity\n"}
{:tag :ret, :val "nil", :ns "user", :ms 1, :form "(binding [*out* *err*] (flush))"}
(defn identity [x] x)
{:tag :ret, :val "#'user/identity", :ns "user", :ms 1, :form "(defn identity [x] x)"}
(binding [*out* *err*] (flush))
{:tag :ret, :val "nil", :ns "user", :ms 1, :form "(binding [*out* *err*] (flush))"}
这是预期的行为吗?