Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: 1f0c179994
Fetching contributors…

Cannot retrieve contributors at this time

18 lines (14 sloc) 0.558 kb
(ns tryclojure.eval-test
(:use tryclojure.models.eval
clojure.test)
(:require noir.session))
(def sb (make-sandbox))
(deftest eval-form-test
(let [form "(do (println 10) (+ 3 3))"
result (eval-string form sb)]
(is (= "10\n" (-> result :result first str)))
(is (= "6" (-> result :result second str)))
(is (= (read-string form) (-> result :expr)))))
(alter-var-root #'noir.session/*noir-session* (constantly (atom {})))
(deftest eval-request-test
(is (= "Execution Timed Out!" (:message (eval-request "(while true)")))))
Jump to Line
Something went wrong with that request. Please try again.