                       (subprocess-compiler-form fregec-args)))
       (when class-name
         (eval/eval-in (project/merge-profiles project [subprocess-profile])
-                      (run-main-form class-name (vec run-args)))))))
+                      (case op
+                        :run (run-main-form class-name (vec run-args))
+                        :test (run-main-form "frege.tools.Quick" (into [class-name] run-args))))))))

                           arg)) args))

(defn- run-class-args
  "Given command line arguments, extract :run ClassName.
  Returns a pair of ClassName (or nil) and the args without :run."
  [args]
  (let [[before run-etc] (split-with (partial not= ":run") args)]
    (if (seq run-etc)
      [(second run-etc) before (rest (rest run-etc))]
      [nil args nil])))

(defn- run-main-form
  "Build a form that can run the main method of the given class."

To display the Frege compiler's help, use: lein fregec :help"
  [project & args]
  (binding [*out* *err*]
    (let [[op class-name args run-args] (run-class-args args)
          project (merge {:frege-source-paths ["."]} project)
          srcs  (:frege-source-paths project)
          out   (:compile-path project)
