Socket repl tests fix
This commit is contained in:
parent
612e6f38fb
commit
a5be01c740
2 changed files with 8 additions and 8 deletions
2
sci
2
sci
|
|
@ -1 +1 @@
|
|||
Subproject commit f1778710e94d4e12dfce7dccb6ee0a301eccefcc
|
||||
Subproject commit 60778bfaabf4fbed635d9490bac88b86fdfb0e4d
|
||||
|
|
@ -21,8 +21,7 @@
|
|||
(when-let [l (.readLine ^java.io.BufferedReader reader)]
|
||||
(binding [*out* sw]
|
||||
(println l))
|
||||
(when-not (str/includes? l expected)
|
||||
(recur))))
|
||||
(recur)))
|
||||
(let [s (str sw)]
|
||||
(is (str/includes? s expected)
|
||||
(format "\"%s\" does not contain \"%s\""
|
||||
|
|
@ -46,15 +45,15 @@
|
|||
(while (not (zero? (:exit
|
||||
(sh "bash" "-c"
|
||||
"lsof -t -i:1666"))))))
|
||||
(is (socket-command '(+ 1 2 3) "user=> 6"))
|
||||
(is (socket-command "(+ 1 2 3)" "user=> 6"))
|
||||
(testing "*in*"
|
||||
(is (socket-command "*in*" "[1 2 3]")))
|
||||
(testing "*command-line-args*"
|
||||
(is (socket-command '*command-line-args* "\"a\" \"b\" \"c\"")))
|
||||
(testing "&env"
|
||||
(socket-command '(defmacro bindings [] (mapv #(list 'quote %) (keys &env))) "")
|
||||
(socket-command '(defn bar [x y z] (bindings)) "")
|
||||
(is (socket-command '(bar 1 2 3) "[x y z]")))
|
||||
(socket-command "(defmacro bindings [] (mapv #(list 'quote %) (keys &env)))" "bindings")
|
||||
(socket-command "(defn bar [x y z] (bindings))" "bar")
|
||||
(is (socket-command "(bar 1 2 3)" "[x y z]")))
|
||||
(testing "reader conditionals"
|
||||
(is (socket-command "#?(:bb 1337 :clj 8888)" "1337")))
|
||||
(testing "*1, *2, *3, *e"
|
||||
|
|
@ -69,7 +68,8 @@
|
|||
|
||||
(comment
|
||||
(socket-repl-test)
|
||||
(t/run-tests)
|
||||
(dotimes [_ 1000]
|
||||
(t/run-tests))
|
||||
(stop-repl!)
|
||||
(start-repl! "0.0.0.0:1666" {:bindings {(with-meta '*in*
|
||||
{:sci/deref! true})
|
||||
|
|
|
|||
Loading…
Reference in a new issue