diff options
author | Bozhidar Batsov <bozhidar@batsov.com> | 2016-03-21 20:55:25 +0200 |
---|---|---|
committer | Bozhidar Batsov <bozhidar@batsov.com> | 2016-03-21 20:55:25 +0200 |
commit | a33eb59d5f2cd7352f86793c8ec5f6402f83b7b4 (patch) | |
tree | 5571cfdc3857e9d8d2751021c5ba8cfe49d56ffc /cider-test.el | |
parent | e670a7e94460c872068a50b2e784ad32bc2d2e87 (diff) |
[Fix #1625] Display a more meaningful message when running individual
tests
Diffstat (limited to 'cider-test.el')
-rw-r--r-- | cider-test.el | 30 |
1 files changed, 19 insertions, 11 deletions
diff --git a/cider-test.el b/cider-test.el index 0f28e793..7fa018ab 100644 --- a/cider-test.el +++ b/cider-test.el @@ -402,16 +402,21 @@ With the actual value, the outermost '(not ...)' s-expression is removed." ;;; Message echo -(defun cider-test-echo-running (ns) - "Echo a running message for the test NS, which may be a keyword." - (message "Running tests in %s..." - (concat (cider-propertize - (cond ((stringp ns) ns) - ((eq :non-passing ns) "failing") - ((eq :loaded ns) "all loaded") - ((eq :project ns) "all project")) - 'ns) - (unless (stringp ns) " namespaces")))) +(defun cider-test-echo-running (ns &optional test) + "Echo a running message for the test NS, which may be a keyword. +The optional arg TEST denotes an individual test name." + (if test + (message "Running test %s in %s..." + (cider-propertize test 'bold) + (cider-propertize ns 'ns)) + (message "Running tests in %s..." + (concat (cider-propertize + (cond ((stringp ns) ns) + ((eq :non-passing ns) "failing") + ((eq :loaded ns) "all loaded") + ((eq :project ns) "all project")) + 'ns) + (unless (stringp ns) " namespaces"))))) (defun cider-test-echo-summary (summary results) "Echo SUMMARY statistics for a test run returning RESULTS." @@ -539,7 +544,10 @@ are highlighted." (cider-test-clear-highlights) (cider-map-connections (lambda (conn) - (cider-test-echo-running ns) + (if (and tests (= (length tests) 1)) + ;; we generate a different message when running individual tests + (cider-test-echo-running ns (car tests)) + (cider-test-echo-running ns)) (cider-nrepl-send-request (list "op" (cond ((stringp ns) "test") ((eq :project ns) "test-all") |