This repository was archived by the owner on Apr 25, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +32
-1
lines changed
test/clojure/test_clojure Expand file tree Collapse file tree 3 files changed +32
-1
lines changed Original file line number Diff line number Diff line change 176
176
<goals >
177
177
<goal >jar</goal >
178
178
</goals >
179
+ <configuration >
180
+ <excludes >
181
+ <exclude >clojure/version.properties</exclude >
182
+ </excludes >
183
+ </configuration >
179
184
</execution >
180
185
</executions >
181
186
</plugin >
Original file line number Diff line number Diff line change @@ -87,7 +87,6 @@ public static void main(String[] args) throws IOException{
87
87
try
88
88
{
89
89
out .flush ();
90
- out .close ();
91
90
}
92
91
catch (IOException e )
93
92
{
Original file line number Diff line number Diff line change 172
172
173
173
(should-print-err-message #"(?s).*k is not matching primitive.*"
174
174
#(loop [k (clojure.test-clojure.compilation/primfn )] (recur :foo ))))
175
+
176
+ #_(deftest CLJ-1154-use-out-after-compile
177
+ ; ; This test creates a dummy file to compile, sets up a dummy
178
+ ; ; compiled output directory, and a dummy output stream, and
179
+ ; ; verifies the stream is still usable after compiling.
180
+ (spit " test/dummy.clj" " (ns dummy)" )
181
+ (try
182
+ (let [compile-path (System/getProperty " clojure.compile.path" )
183
+ tmp (java.io.File. " tmp" )
184
+ new-out (java.io.OutputStreamWriter. (java.io.ByteArrayOutputStream. ))]
185
+ (binding [clojure.core/*out* new-out]
186
+ (try
187
+ (.mkdir tmp)
188
+ (System/setProperty " clojure.compile.path" " tmp" )
189
+ (clojure.lang.Compile/main (into-array [" dummy" ]))
190
+ (println " this should still work without throwing an exception" )
191
+ (finally
192
+ (if compile-path
193
+ (System/setProperty " clojure.compile.path" compile-path)
194
+ (System/clearProperty " clojure.compile.path" ))
195
+ (doseq [f (.listFiles tmp)]
196
+ (.delete f))
197
+ (.delete tmp)))))
198
+ (finally
199
+ (doseq [f (.listFiles (java.io.File. " test" ))
200
+ :when (re-find #"dummy.clj" (str f))]
201
+ (.delete f)))))
You can’t perform that action at this time.
0 commit comments