emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] master 9cf6a40: Use only posix options in a ediff-ptch tes


From: Tino Calancha
Subject: [Emacs-diffs] master 9cf6a40: Use only posix options in a ediff-ptch test
Date: Sat, 1 Apr 2017 04:04:22 -0400 (EDT)

branch: master
commit 9cf6a408c8f1678dc4a53f722aa1984c9489b4c2
Author: Tino Calancha <address@hidden>
Commit: Tino Calancha <address@hidden>

    Use only posix options in a ediff-ptch test
    
    * test/lisp/vc/ediff-ptch-tests.el (ediff-ptch-test-bug26084):
    Use just "-b" patch option.  Don't assume a particular suffix for
    the backup files.
---
 test/lisp/vc/ediff-ptch-tests.el | 25 +++++++++++++++----------
 1 file changed, 15 insertions(+), 10 deletions(-)

diff --git a/test/lisp/vc/ediff-ptch-tests.el b/test/lisp/vc/ediff-ptch-tests.el
index 7372a72..387786c 100644
--- a/test/lisp/vc/ediff-ptch-tests.el
+++ b/test/lisp/vc/ediff-ptch-tests.el
@@ -86,18 +86,23 @@ index 6a07f80..6e8e947 100644
                                    (point-max)
                                    ediff-patch-program
                                    nil nil nil
-                                   "-f" "-z.orig" "-b"
-                                   (cdr x))))
+                                   "-b" (cdr x))))
           ;; Check backup files were saved correctly.
           (dolist (x (list qux bar))
-            (should-not (string= (with-temp-buffer
-                                   (insert-file-contents x)
-                                   (buffer-string))
-                                 (with-temp-buffer
-                                   (insert-file-contents (concat x 
ediff-backup-extension))
-                                   (buffer-string))))))
-      (delete-directory tmpdir 'recursive)
-      (delete-file patch))))
+            (let ((backup
+                   (car
+                    (directory-files
+                     tmpdir 'full
+                     (concat (file-name-nondirectory x) ".")))))
+              (should-not
+               (string= (with-temp-buffer
+                          (insert-file-contents x)
+                          (buffer-string))
+                        (with-temp-buffer
+                          (insert-file-contents backup)
+                          (buffer-string))))))
+          (delete-directory tmpdir 'recursive)
+          (delete-file patch)))))
 
 
 (provide 'ediff-ptch-tests)



reply via email to

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