diff options
Diffstat (limited to 'lisp/eshell/esh-test.el')
-rw-r--r-- | lisp/eshell/esh-test.el | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/lisp/eshell/esh-test.el b/lisp/eshell/esh-test.el index fc52e976a7f..1879bf96f41 100644 --- a/lisp/eshell/esh-test.el +++ b/lisp/eshell/esh-test.el @@ -43,7 +43,7 @@ (defface eshell-test-ok '((((class color) (background light)) (:foreground "Green" :bold t)) (((class color) (background dark)) (:foreground "Green" :bold t))) - "*The face used to highlight OK result strings." + "The face used to highlight OK result strings." :group 'eshell-test) (define-obsolete-face-alias 'eshell-test-ok-face 'eshell-test-ok "22.1") @@ -51,12 +51,12 @@ '((((class color) (background light)) (:foreground "OrangeRed" :bold t)) (((class color) (background dark)) (:foreground "OrangeRed" :bold t)) (t (:bold t))) - "*The face used to highlight FAILED result strings." + "The face used to highlight FAILED result strings." :group 'eshell-test) (define-obsolete-face-alias 'eshell-test-failed-face 'eshell-test-failed "22.1") (defcustom eshell-show-usage-metrics nil - "*If non-nil, display different usage metrics for each Eshell command." + "If non-nil, display different usage metrics for each Eshell command." :set (lambda (symbol value) (if value (add-hook 'eshell-mode-hook 'eshell-show-usage-metrics) @@ -101,7 +101,7 @@ (eshell-redisplay)) (let ((truth (eval command))) (with-current-buffer test-buffer - (delete-backward-char 6) + (delete-char -6) (insert-before-markers "[" (let (str) (if truth @@ -150,7 +150,7 @@ (defun eshell-test (&optional arg) "Test Eshell to verify that it works as expected." (interactive "P") - (let* ((begin (eshell-time-to-seconds (current-time))) + (let* ((begin (float-time)) (test-buffer (get-buffer-create "*eshell test*"))) (set-buffer (let ((inhibit-redisplay t)) (save-window-excursion (eshell t)))) @@ -176,8 +176,7 @@ (with-current-buffer test-buffer (insert (format "\n\n--- %s --- (completed in %d seconds)\n" (current-time-string) - (- (eshell-time-to-seconds (current-time)) - begin))) + (- (float-time) begin))) (message "Eshell test suite completed: %s failure%s" (if (> eshell-test-failures 0) (number-to-string eshell-test-failures) @@ -223,14 +222,13 @@ (if (eq eshell-show-usage-metrics t) (- eshell-metric-after-command eshell-metric-before-command 7) - (- (eshell-time-to-seconds + (- (float-time eshell-metric-after-command) - (eshell-time-to-seconds + (float-time eshell-metric-before-command)))) "\n")))) nil t)) (provide 'esh-test) -;; arch-tag: 6e32275a-8285-4a4e-b7cf-819aa7c86b8e ;;; esh-test.el ends here |