emacs-elpa-diffs
[Top][All Lists]
Advanced

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

[elpa] externals/ssh-deploy 7ad73a4 103/133: Unit test for directory dif


From: Stefan Monnier
Subject: [elpa] externals/ssh-deploy 7ad73a4 103/133: Unit test for directory difference passing
Date: Sat, 27 Mar 2021 14:48:53 -0400 (EDT)

branch: externals/ssh-deploy
commit 7ad73a41e89cda19c775f2150af5e0bda35a86b1
Author: Christian Johansson <christian@cvj.se>
Commit: Christian Johansson <christian@cvj.se>

    Unit test for directory difference passing
---
 ssh-deploy-test.el | 2 +-
 ssh-deploy.el      | 5 +++++
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/ssh-deploy-test.el b/ssh-deploy-test.el
index 21c6e59..a1a8a49 100644
--- a/ssh-deploy-test.el
+++ b/ssh-deploy-test.el
@@ -408,7 +408,7 @@
 
         (should (equal
                  (ssh-deploy--diff-directories-data directory-a directory-b 
ssh-deploy-exclude-list)
-                 (list directory-a directory-b ssh-deploy-exclude-list (list 
file-1-filename file-2-filename) nil (list file-1-filename file-2-filename) 
nil)))
+                 (list directory-a directory-b ssh-deploy-exclude-list (list 
file-1-filename file-2-filename) nil nil (list file-1-filename file-2-filename) 
nil)))
 
         ;; Delete test files
         (delete-file file-b-2)
diff --git a/ssh-deploy.el b/ssh-deploy.el
index 918d9ba..11ab352 100644
--- a/ssh-deploy.el
+++ b/ssh-deploy.el
@@ -617,6 +617,7 @@
                      (setq files-a-only (list file-a))
                    (push file-a files-a-only))))
              files-a-relative-list)
+            (setq files-a-only (sort files-a-only #'string<))
 
             ;; Collect files that only exists in directory b
             (mapc
@@ -627,6 +628,7 @@
                      (setq files-b-only (list file-b))
                    (push file-b files-b-only))))
              files-b-relative-list)
+            (setq files-b-only (sort files-b-only #'string<))
 
             ;; Collect files that differ in contents and have equal contents
             (mapc
@@ -641,6 +643,9 @@
                        (setq files-both-differs (list file))
                      (push file files-both-differs)))))
              files-both)
+            (setq files-both (sort files-both #'string<))
+            (setq files-both-equals (sort files-both-equals #'string<))
+            (setq files-both-differs (sort files-both-differs #'string<))
 
             (list directory-a directory-b exclude-list files-both files-a-only 
files-b-only files-both-equals files-both-differs))
         (display-warning 'ssh-deploy "Both directories need to exist to 
perform difference generation." :warning))



reply via email to

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