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

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

[elpa] externals/ssh-deploy f462007 105/133: More work on directory diff


From: Stefan Monnier
Subject: [elpa] externals/ssh-deploy f462007 105/133: More work on directory difference unit test
Date: Sat, 27 Mar 2021 14:48:53 -0400 (EDT)

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

    More work on directory difference unit test
---
 ssh-deploy-test.el | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/ssh-deploy-test.el b/ssh-deploy-test.el
index a1a8a49..2c15cef 100644
--- a/ssh-deploy-test.el
+++ b/ssh-deploy-test.el
@@ -406,10 +406,27 @@
         ;; Verify that both files have equal contents
         (should (equal t (ediff-same-file-contents file-a-2 file-b-2)))
 
+        ;; Both files should equal
         (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 nil (list file-1-filename file-2-filename) 
nil)))
 
+        ;; Create file 1
+        (find-file file-b-1)
+        (insert file-a-1-contents)
+        (save-buffer) ;; NOTE Should trigger upload action
+        (when (> async 0)
+          (sleep-for 1))
+        (kill-buffer)
+
+        ;; Verify that both files have equal contents
+        (should (equal nil (ediff-same-file-contents file-a-1 file-b-1)))
+
+        ;; Both files should equal
+        (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 nil (list file-1-filename) nil (list 
file-2-filename))))
+
         ;; Delete test files
         (delete-file file-b-2)
         (delete-file file-b-1)
@@ -438,6 +455,7 @@
 (defun ssh-deploy-test ()
   "Run test for plug-in."
   (require 'ssh-deploy)
+
   (let ((ssh-deploy-verbose 1)
         (ssh-deploy-debug 1)
         ;; (debug-on-error t)



reply via email to

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