File tree Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Original file line number Diff line number Diff line change 9
9
(defn eagerly-consume
10
10
" Recursively force all lazy-seqs in val."
11
11
[val]
12
- (try
13
- (postwalk-replace {} val)
14
- (catch Throwable _))
12
+ (postwalk-replace {} val)
15
13
val )
16
14
17
15
(def ^{:doc " Create a map of pretty keywords to ugly TimeUnits" }
161
159
(read-string ~tester-str)))
162
160
~(make-dot tester-sym)
163
161
~(ensafen code))]
164
- (with-bindings bindings (transform ( jvm-sandbox #(eval code) context) ))))))
162
+ (with-bindings bindings (jvm-sandbox #(transform ( eval code)) context))))))
165
163
166
164
(defn set-security-manager
167
165
" Sets the system security manager to whatever you pass. Passing nil is
Original file line number Diff line number Diff line change 168
168
x))
169
169
'(dotimes [n 1000000 ]
170
170
(Math/ceil n)))))
171
+
172
+ (deftest laziness-test
173
+ (let [sb (sandbox secure-tester)]
174
+ (is (thrown-with-msg? Exception #"access denied"
175
+ (sb '(map slurp [" project.clj" ]))))))
You can’t perform that action at this time.
0 commit comments