So, the next question - possibly another name-space question. Is there any way to tell if inside a .clj file if it was invoked as a script by clojure.main, vs. being loaded for use elsewhere?
What I'd like to do is make my unit tests usable in two modes: While working on a bug, I'd like to be able to load them in the REPL to rerun the subset of interest - possibly just the test which is failing. However, I'd also like to be able to feed the script to clojure.main with something like "clj test.clj" and have it run them all. I have the latter working - I just provide the appropriate run-tests form at the bottom of the unit tests file. However, this causes the tests to be run whenever I load them, which I'd like to avoid. I could have an arg check of my own, or possibly the value of some of the hooks in clojure.main, but those don't feel quite clean. So the question: is there a good way to distinguish being run as a script from being loaded from the repl (or by another file, for that matter). Thanks, <mike -- Mike Meyer <m...@mired.org> http://www.mired.org/consulting.html Independent Network/Unix/Perforce consultant, email for more information. O< ascii ribbon campaign - stop html mail - www.asciiribbon.org -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en