test from src
This commit is contained in:
parent
23aa68346c
commit
a671ed4e38
4 changed files with 6 additions and 9 deletions
|
|
@ -53,7 +53,6 @@
|
||||||
[babashka.impl.server :refer [clojure-core-server-namespace]]
|
[babashka.impl.server :refer [clojure-core-server-namespace]]
|
||||||
[babashka.impl.socket-repl :as socket-repl]
|
[babashka.impl.socket-repl :as socket-repl]
|
||||||
[babashka.impl.tasks :as tasks :refer [tasks-namespace]]
|
[babashka.impl.tasks :as tasks :refer [tasks-namespace]]
|
||||||
[babashka.impl.test :as t]
|
|
||||||
[babashka.impl.tools.cli :refer [tools-cli-namespace]]
|
[babashka.impl.tools.cli :refer [tools-cli-namespace]]
|
||||||
[babashka.impl.uberscript :as uberscript]
|
[babashka.impl.uberscript :as uberscript]
|
||||||
[babashka.nrepl.server :as nrepl-server]
|
[babashka.nrepl.server :as nrepl-server]
|
||||||
|
|
|
||||||
|
|
@ -9,6 +9,7 @@
|
||||||
[bencode.core :as bencode]
|
[bencode.core :as bencode]
|
||||||
[clojure.test :as t :refer [deftest is testing]]
|
[clojure.test :as t :refer [deftest is testing]]
|
||||||
[sci.core :as sci]
|
[sci.core :as sci]
|
||||||
|
[babashka.impl.common :as common]
|
||||||
[sci.ctx-store :as ctx-store]
|
[sci.ctx-store :as ctx-store]
|
||||||
[babashka.impl.classpath :as cp])
|
[babashka.impl.classpath :as cp])
|
||||||
(:import
|
(:import
|
||||||
|
|
@ -213,8 +214,8 @@
|
||||||
(deftest ^:skip-windows nrepl-server-test
|
(deftest ^:skip-windows nrepl-server-test
|
||||||
(let [proc-state (atom nil)
|
(let [proc-state (atom nil)
|
||||||
server-state (atom nil)
|
server-state (atom nil)
|
||||||
ctx (sci/init {:namespaces main/namespaces
|
_ (main/main "-e" "nil") ;; dummy invocation to reset ctx
|
||||||
:features #{:bb}})]
|
ctx (common/ctx)]
|
||||||
(sci.ctx-store/with-ctx ctx
|
(sci.ctx-store/with-ctx ctx
|
||||||
(try
|
(try
|
||||||
(if tu/jvm?
|
(if tu/jvm?
|
||||||
|
|
|
||||||
|
|
@ -1,17 +1,14 @@
|
||||||
(ns babashka.test-test
|
(ns babashka.test-test
|
||||||
(:require
|
(:require
|
||||||
[babashka.impl.clojure.test :as test-impl]
|
#_[babashka.impl.clojure.test :as test-impl]
|
||||||
[babashka.test-utils :as tu]
|
[babashka.test-utils :as tu]
|
||||||
[clojure.edn :as edn]
|
[clojure.edn :as edn]
|
||||||
[clojure.java.io :as io]
|
[clojure.java.io :as io]
|
||||||
[clojure.string :as str]
|
[clojure.string :as str]
|
||||||
[clojure.test :as t :refer [deftest is]]
|
[clojure.test :as t :refer [deftest is]]))
|
||||||
[sci.core :as sci]))
|
|
||||||
|
|
||||||
(defn bb [& args]
|
(defn bb [& args]
|
||||||
(let [sw (java.io.StringWriter.)]
|
(str (apply tu/bb nil (map str args))))
|
||||||
(sci/binding [test-impl/test-out sw]
|
|
||||||
(str sw (apply tu/bb nil (map str args))))))
|
|
||||||
|
|
||||||
(deftest deftest-test
|
(deftest deftest-test
|
||||||
(is (str/includes?
|
(is (str/includes?
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue