emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master 281f48f19e: ; Fix Eshell prompt tests when the current user is ro


From: Jim Porter
Subject: master 281f48f19e: ; Fix Eshell prompt tests when the current user is root
Date: Tue, 17 Jan 2023 20:01:13 -0500 (EST)

branch: master
commit 281f48f19ecad706a639d57cb937afb0b97eded7
Author: Jim Porter <jporterbugs@gmail.com>
Commit: Jim Porter <jporterbugs@gmail.com>

    ; Fix Eshell prompt tests when the current user is root
    
    * test/lisp/eshell/em-prompt-tests.el
    (em-prompt-test/field-properties)
    (em-prompt-test/field-properties/no-highlight): Handle the case when
    the current user is root.
---
 test/lisp/eshell/em-prompt-tests.el | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/test/lisp/eshell/em-prompt-tests.el 
b/test/lisp/eshell/em-prompt-tests.el
index 91464a98c2..db45e2ae3a 100644
--- a/test/lisp/eshell/em-prompt-tests.el
+++ b/test/lisp/eshell/em-prompt-tests.el
@@ -44,7 +44,8 @@
      (should (equal-including-properties
               last-prompt
               (propertize
-               (format "%s $ " (directory-file-name default-directory))
+               (format "%s %s " (directory-file-name default-directory)
+                       (if (= (file-user-uid) 0) "#" "$"))
                'read-only t
                'field 'prompt
                'font-lock-face 'eshell-prompt
@@ -68,7 +69,8 @@ This tests the case when `eshell-highlight-prompt' is nil."
        (should (equal-including-properties
                 last-prompt
                 (propertize
-                 (format "%s $ " (directory-file-name default-directory))
+                 (format "%s %s " (directory-file-name default-directory)
+                         (if (= (file-user-uid) 0) "#" "$"))
                  'field 'prompt
                  'front-sticky '(field)
                  'rear-nonsticky '(field))))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]